openclaw - 💡(How to fix) Fix [Bug]: /context detail shows ~62k untracked provider/runtime overhead on fresh OpenAI Codex gpt-5.5 session [5 pull requests]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Fresh reset sessions using OpenAI Codex OAuth / openai/gpt-5.5 show ~66k tokens of context usage even though /context detail can only account for ~4k tracked prompt tokens.

Root Cause

Fresh reset sessions using OpenAI Codex OAuth / openai/gpt-5.5 show ~66k tokens of context usage even though /context detail can only account for ~4k tracked prompt tokens.

Fix Action

Fixed

RAW_BUFFERClick to expand / collapse

Bug type

Behavior bug (incorrect output/state without crash)

Beta release blocker

No

Summary

Summary

Fresh reset sessions using OpenAI Codex OAuth / openai/gpt-5.5 show ~66k tokens of context usage even though /context detail can only account for ~4k tracked prompt tokens.

Environment

  • OpenClaw: 2026.5.22
  • Runtime: OpenAI Codex OAuth
  • Model: openai/gpt-5.5
  • OS: Ubuntu 24.04
  • Agent tested: Claw and Reviewer

Observed

After session reset and a trivial prompt like Ping?, /context detail reports:

  • Tracked prompt estimate: ~4,240 tok
  • Actual context usage: ~66,793 tok
  • Untracked provider/runtime overhead: ~62,553 tok

Changing the following did not materially reduce the number:

  • tools.profile: full → coding → minimal
  • disabled memory-core and memory-wiki
  • reduced Claw skills to only summarize/taskflow
  • rewrote AGENTS.md to avoid automatic MEMORY.md/daily note loading
  • reset session repeatedly
  • tested Reviewer as well

Expected

A fresh reset session should report context usage close to the tracked prompt estimate plus known runtime/tool overhead. If the extra ~62k is cacheRead/cacheWrite, provider-side native thread state, or another runtime value, /context detail should label it clearly and it should not trigger misleading context/compaction behavior.

Related issues

  • #67419 bootstrap files re-injected / 20–30% startup context
  • #72321 cumulative cacheRead/cacheWrite context display bug
  • #13853 cache token inflation causes premature compaction
  • #13782 /status context display inflated to 200k/200k
  • #70972 status bar shows 0% when context is mostly cached
  • #75707 compaction/session/tokenization performance loops

Steps to reproduce

  1. Start OpenClaw 2026.5.22 with OpenAI Codex OAuth configured and openai/gpt-5.5 as the active model.
  2. Use a fresh/reset agent session. In my case, I reproduced this with both Claw and Reviewer.
  3. Minimize local context sources:
    • set tools.profile to minimal
    • disable memory-core and memory-wiki
    • reduce Claw skills to only minimal skills, e.g. summarize and taskflow
    • rewrite AGENTS.md to avoid automatic MEMORY.md / daily-note loading
  4. Send a trivial message such as Ping?.
  5. Run /context detail.
  6. Observe that the tracked prompt estimate is small, but actual context usage is much larger.

Observed example:

  • Tracked prompt estimate: 16,957 chars (~4,240 tok)
  • Actual context usage: 66,793 tok
  • Untracked provider/runtime overhead: ~62,553 tok
  • Session tokens: 66,793 total / ctx=200,000

This also persists after changing tools.profile from fullcodingminimal, disabling memory plugins, reducing skills, and resetting the session.

Expected behavior

For a fresh/reset session with a trivial prompt, actual context usage should be close to the tracked prompt estimate plus clearly identified runtime/tool overhead.

If the extra ~60k tokens represent provider-side cache tokens, native Codex app-server state, hidden runtime scaffolding, or another expected overhead, /context detail should label the source clearly.

This untracked overhead should not be presented as ordinary context occupancy or used to trigger misleading context warnings/compaction behavior unless it truly consumes the model’s available context window.

Actual behavior

After resetting a fresh agent session and sending a trivial prompt such as Ping?, OpenClaw reports high context usage even though /context detail accounts for only a small prompt.

Observed /context detail output:

  • Tracked prompt estimate: 16,957 chars (~4,240 tok)
  • Actual context usage: 66,793 tok
  • Untracked provider/runtime overhead: ~62,553 tok
  • Session tokens: 66,793 total / ctx=200,000

The issue persisted after the following reductions/tests:

  • tools.profile changed from fullcodingminimal
  • memory-core and memory-wiki disabled
  • Claw skills reduced to summarize and taskflow
  • AGENTS.md rewritten to avoid automatic MEMORY.md / daily-note loading
  • session reset repeatedly
  • tested with both Claw and Reviewer

Reviewer showed a similar absolute baseline, around 63.9k / 200k, suggesting the overhead is not specific to one agent.

OpenClaw version

2026.5.22 (a374c3a)

Operating system

Ubuntu 24.04.4

Install method

npm global

Model

openai/gpt-5.5

Provider / routing chain

OpenClaw -> OpenAI Codex OAuth -> openai/gpt-5.5

Additional provider/model setup details

No response

Logs, screenshots, and evidence

Impact and severity

No response

Additional information

<img width="1497" height="472" alt="Image" src="https://github.com/user-attachments/assets/1019d7c3-6308-4288-a8b8-026d663b8295" />

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

FAQ

Expected behavior

For a fresh/reset session with a trivial prompt, actual context usage should be close to the tracked prompt estimate plus clearly identified runtime/tool overhead.

If the extra ~60k tokens represent provider-side cache tokens, native Codex app-server state, hidden runtime scaffolding, or another expected overhead, /context detail should label the source clearly.

This untracked overhead should not be presented as ordinary context occupancy or used to trigger misleading context warnings/compaction behavior unless it truly consumes the model’s available context window.

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

openclaw - 💡(How to fix) Fix [Bug]: /context detail shows ~62k untracked provider/runtime overhead on fresh OpenAI Codex gpt-5.5 session [5 pull requests]