fix(auxiliary): floor config-derived compression timeout at 300s (#54915) - #59807
Merged
Conversation
…all back to marker (#54915)
This was referenced Jul 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Codex/reasoning-model compression summaries no longer die at the 120s auxiliary timeout and silently degrade to a context marker: config-derived compression timeouts now get a bounded 300s floor. Fixes #54915; second half of the "gpt-5.5 compacts continuously near 272K" community report (with #59804).
Root cause: with
auxiliary.compression.provider: auto, compression rides the main runtime. Codex gpt-5.5 summarizing a large context legitimately exceeds the default 120s stream deadline; the timeout aborts the summary and the compressor inserts a deterministic marker that barely shrinks the session, so compaction immediately re-triggers.Salvaged from PR #54943 by @Tranquil-Flow (cherry-picked, authorship preserved). Honors all four issue constraints: bounded (not infinite), compression-task-only, explicit per-call
timeout=never floored, higher config values kept. Covers sync + async paths; verified the floor propagates into the Codex Responses streamtotal_timeout.Changes
agent/auxiliary_client.py:_COMPRESSION_TIMEOUT_FLOOR_SECONDS = 300.0+_effective_aux_timeout()helper; wired into bothcall_llmandasync_call_llmtests/agent/test_auxiliary_compression_timeout_floor.py: new suite exercising real call paths with mocked client (floor applied / explicit override honored / other tasks untouched / higher config kept, sync + async)Validation
timeout=60on compressionE2E: real
call_llm(task="compression")with mocked openai-codex client asserts timeout=300.0 reachescompletions.create.Infographic