Codex Desktop bug double-counts historical reasoning, triggering compaction at 54%

ghyghoo8 · ghdev · 2026-10-14

openai/codex issue #53913 documents a double-counting bug in Codex Desktop's Responses Lite mode: when x-reasoning-included is absent, the native client re-adds old encrypted reasoning items to the context total, triggering auto-compaction far too early.

The author reconciled local counters exactly: compaction fired at 54% used (255k/475k), but lastapitotaltokens (255,367) plus a client-side estimate of 193 historical reasoning items (200,147) sums to exactly 455,514, exceeding the 450,000 threshold. The estimator formula ceil(max(floor(3encodedlength/4)-650,0)/4) was reverse-checked, and two actual generation requests confirmed the findings.

Original post →

More from coding & agent

coding & agent channel →