mirror of
https://github.com/openai/codex.git
synced 2026-12-03 00:41:03 +00:00
## Why Conservative image token estimates can trigger a soft reset even when the completed scoring conversation leaves room for new evidence. ## What changed Store the reported context token count with each completed scoring conversation. For the next soft reset decision, add the estimated tokens for new evidence to that count. Fall back to estimating the retained history when the latest completion has no usable usage. The hard input limit and metrics still use the conservative full-request estimate. ## Testing Cover history reuse after a low usage report, rebuilding after a higher report, and fallback when usage is zero or missing. Check that a low reported count cannot bypass the hard input limit. GitOrigin-RevId: 42557d5b7272e651046e7c06226f757b59b9fa67