Summary
The context-size estimate logged by the openai-codex no-byte TTFB watchdog (Disabling openai-codex no-byte TTFB watchdog for large request (context=~X tokens ...)) can balloon far past reality. In one session (v0.18.2, gpt-5.6-sol via openai-codex) it climbed to ~1.9M tokens, then dropped abruptly to ~689K and climbed back toward ~750K — while the authoritative per-call accounting (API call #N ... in= / prompt_tokens) for the same session stayed sane the whole time (90K-175K), and the real compression trigger path behaved normally.
Suspected trigger
The divergence began after the session processed:
- two
vision_analyze calls on browser screenshots auto-resized to extreme aspect ratios (195x5834 and 195x6042 px), and
- tool output containing large embedded SVG /
data: URI payloads.
So the char-based (or image-cost) estimator on the watchdog path appears to massively overcount these payloads relative to what is actually sent/tokenized.
Impact
Cosmetic-plus: the real compression gate keys off real token accounting so no misbehavior was observed there, but the log line is alarming during incident forensics (a phantom "1.9M-token session"), and anything else that ever consumes this estimate would inherit the error.
Environment
hermes-agent 0.18.2 (at af250d8), provider openai-codex, model gpt-5.6-sol, Linux.
https://claude.ai/code/session_015StmTvr85VriETdW9Gy9D5
Summary
The context-size estimate logged by the openai-codex no-byte TTFB watchdog (
Disabling openai-codex no-byte TTFB watchdog for large request (context=~X tokens ...)) can balloon far past reality. In one session (v0.18.2, gpt-5.6-sol via openai-codex) it climbed to ~1.9M tokens, then dropped abruptly to ~689K and climbed back toward ~750K — while the authoritative per-call accounting (API call #N ... in=/prompt_tokens) for the same session stayed sane the whole time (90K-175K), and the real compression trigger path behaved normally.Suspected trigger
The divergence began after the session processed:
vision_analyzecalls on browser screenshots auto-resized to extreme aspect ratios (195x5834 and 195x6042 px), anddata:URI payloads.So the char-based (or image-cost) estimator on the watchdog path appears to massively overcount these payloads relative to what is actually sent/tokenized.
Impact
Cosmetic-plus: the real compression gate keys off real token accounting so no misbehavior was observed there, but the log line is alarming during incident forensics (a phantom "1.9M-token session"), and anything else that ever consumes this estimate would inherit the error.
Environment
hermes-agent 0.18.2 (at af250d8), provider openai-codex, model gpt-5.6-sol, Linux.
https://claude.ai/code/session_015StmTvr85VriETdW9Gy9D5