high-frequency code-mode polling, amplified by a very large resumed context

Open 💬 4 comments Opened Jul 11, 2026 by ssh4net

_After consiming unusual huge tokens usage with a Codex Sol 5.6 ~600mln tokens for a day vs usual 150-200mln on a same code base and same sessions from Codex 5.5 i passed a logs to a Codes to understand if this is not my own WSL bug fix (https://github.com/openai/codex/issues/16690) that force me to build a codex-cli every wheek with latest upstream fixes._

And Codex 5.6 Sol xHigh found a possible culprit (maybe this is a known issue?):

During the final Medium interval:

  • 43 minutes, 2 user messages
  • 292 model responses
  • 96 exec calls and 192 wait calls
  • All 192 waits explicitly used yield_time_ms: 1000
  • 49.39M raw tokens
  • Only 10,828 reasoning tokens
  • Five-hour usage increased from 58% to 100%
  • Cache ratio was healthy at 98.3%

The CLI documents a 10-second default (codex-rs/core/src/tools/code_mode/wait_spec.rs:13), but accepts the model’s one-second value unchanged (codex-rs/core/src/tools/code_mode/wait_handler.rs:92). There is no minimum clamp. Every poll causes another model response with approximately 170K–240K input tokens.

Other Findings
The parent rollout now totals 1.153B raw tokens, with 95.4% cached. Most historical usage was GPT-5.5 xhigh (967M), but Sol added 268M on July 10 alone.

Secondary contributors:

  • One guardian auto-review used 60,882 additional raw tokens. approvals_reviewer = "auto_review" is enabled.
  • Historical view_image outputs occupy 132.6 MB, including 48 outputs over 1 MB.
  • Multi-agent is enabled but no actual spawn_agent activity appears.
  • There were no code-mode-host spawn failures in the parent thread.
  • No goals or automatic goal continuations were detected.

On time of investigation upstream still don't have a fixes.

View original on GitHub ↗

This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗