OpenClaw Context Upgrade
Check current state first
- 1. Run
session_status and record:
- current model
- current
Context
- whether the session already shows
1.0m
- 2. If the user is only asking "why isn't it 1M yet", diagnose first. Do not change config blindly.
Inspect the exact config path before editing
- 1. Inspect
agents.defaults.contextTokens with gateway config.schema.lookup. - If model selection matters, also inspect
agents.defaults.model. - Use
gateway config.patch for changes. - Do not tell the user to run
openclaw CLI for this workflow.
Upgrade workflow
- 1. Make sure the target session is using a high-context model.
- Prefer model alias
GPT-5.4 for this workflow.
- During verification, avoid relying on fallback behavior.
- If needed, use
session_status with a session model override to pin the current session to
GPT-5.4.
- 2. Raise the default context budget.
- Set
agents.defaults.contextTokens = 1000000.
- If the user's goal is future sessions, patch defaults.
- If the user only wants diagnosis, explain the change without applying it.
- 3. Let the restart happen.
-
gateway config.patch restarts OpenClaw automatically.
- Always include a clear
note so the user gets a useful completion message after restart.
- 4. Force a fresh chat session.
- Tell the user to use
/new or
/reset.
- Old chats often keep the earlier session budget and mislead verification.
- 5. Verify after the fresh session starts.
- Run
session_status again.
- Success looks like
Context: .../1.0m or similar.
Diagnose common failure modes
Still shows .../272k
Check these in order:
- 1. The chat was not restarted with
/new or /reset. - The session is still on the wrong model or a fallback model.
- The provider/model pair is returning a lower real cap.
- The config patch did not target
agents.defaults.contextTokens correctly.
Tell the truth about limits
- - Do not promise 1M if the provider is actually returning a smaller cap.
- OpenClaw can request a larger budget, but it cannot exceed the model/provider limit in reality.
- If verification still shows
272k, say that plainly and explain whether the blocker is session reuse, model mismatch, or provider cap.
Default reply pattern
Use this sequence when answering:
- 1. State the current observed limit.
- Give the exact fix order:
- pin model to
GPT-5.4
- set
agents.defaults.contextTokens = 1000000
- restart
-
/new or
/reset
- verify with
session_status
- 3. End with the caveat that provider limits still win.
OpenClaw 上下文升级
首先检查当前状态
- 1. 运行 session_status 并记录:
- 当前模型
- 当前上下文
- 会话是否已显示1.0m
- 2. 如果用户仅询问为什么还不是1M,请先进行诊断。不要盲目更改配置。
在编辑前检查确切的配置路径
- 1. 使用 gateway config.schema.lookup 检查 agents.defaults.contextTokens。
- 如果模型选择很重要,也检查 agents.defaults.model。
- 使用 gateway config.patch 进行更改。
- 不要告诉用户为此工作流程运行 openclaw CLI。
升级工作流程
- 1. 确保目标会话使用的是高上下文模型。
- 在此工作流程中优先使用模型别名 GPT-5.4。
- 在验证过程中,避免依赖回退行为。
- 如有需要,使用带有会话模型覆盖的 session_status 将当前会话固定到 GPT-5.4。
- 2. 提高默认上下文预算。
- 设置 agents.defaults.contextTokens = 1000000。
- 如果用户的目标是未来会话,则修补默认值。
- 如果用户只需要诊断,则解释更改但不应用。
- 3. 让重启发生。
- gateway config.patch 会自动重启 OpenClaw。
- 始终包含清晰的备注,以便用户在重启后获得有用的完成消息。
- 4. 强制创建新的聊天会话。
- 告诉用户使用 /new 或 /reset。
- 旧聊天通常会保留之前的会话预算并误导验证。
- 5. 在新会话开始后进行验证。
- 再次运行 session_status。
- 成功表现为 上下文: .../1.0m 或类似内容。
诊断常见失败模式
仍显示 .../272k
按顺序检查:
- 1. 聊天未使用 /new 或 /reset 重启。
- 会话仍在使用错误的模型或回退模型。
- 提供商/模型对返回的实际上限较低。
- 配置补丁未正确针对 agents.defaults.contextTokens。
如实告知限制
- - 如果提供商实际返回的上限较小,不要承诺1M。
- OpenClaw 可以请求更大的预算,但不能超过模型/提供商的实际限制。
- 如果验证仍显示 272k,请如实说明,并解释阻碍因素是会话重用、模型不匹配还是提供商上限。
默认回复模式
回答时使用以下顺序:
- 1. 说明当前观察到的限制。
- 给出确切的修复顺序:
- 将模型固定为 GPT-5.4
- 设置 agents.defaults.contextTokens = 1000000
- 重启
- /new 或 /reset
- 使用 session_status 验证
- 3. 最后说明提供商限制仍然优先。