Skip to content

fix(auxiliary): floor config-derived compression timeout at 300s (#54915) - #59807

Merged
teknium1 merged 1 commit into
mainfrom
fix/compression-timeout-floor
Jul 6, 2026
Merged

fix(auxiliary): floor config-derived compression timeout at 300s (#54915)#59807
teknium1 merged 1 commit into
mainfrom
fix/compression-timeout-floor

Conversation

@teknium1

@teknium1 teknium1 commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

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 stream total_timeout.

Changes

  • agent/auxiliary_client.py: _COMPRESSION_TIMEOUT_FLOOR_SECONDS = 300.0 + _effective_aux_timeout() helper; wired into both call_llm and async_call_llm
  • tests/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

Before After
compression, config timeout 120s 120s reaches client 300s
explicit timeout=60 on compression 60s 60s (unchanged)
title_generation, config 30s 30s 30s (unchanged)
tests: timeout_floor + auxiliary_main_first 29/29 pass

E2E: real call_llm(task="compression") with mocked openai-codex client asserts timeout=300.0 reaches completions.create.

Infographic

infographic

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/agent Core agent runtime: loop, agent_init, prompt builder, context-compression, responses endpoint P2 Medium — degraded but workaround exists provider/openai OpenAI / Codex Responses API type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Codex GPT-5.5 compression can time out at 120s and fall back to marker

3 participants