Bug
DEFAULT_SUMMARIZATION_MAX_DURATION_MS is 120_000. A large session (observed: 257k tokens) summarizing on Grok 4.6 exceeds that budget while still streaming, so compact is rejected:
Compaction rejected: compaction generator failed: Summarization stream exceeded its 120000ms wall-clock budget; treating the request as too slow to keep the session waiting
Tokens do not drop, so the session cannot continue (Context remains above the compaction threshold because compaction did not complete).
The 120s cap was added to stop a trickling stream from freezing the agent-event queue forever. That is a real hang hazard, but 120s is shorter than a legitimate 200k+ summary on slower models. The session then has no compact path at all.
Expected
Keep a wall-clock budget, but size it for large-session summarization (15 minutes / 900_000ms). Idle-timeout (300s silence) still kills a hung connection. A finished summary is better than a session stuck above the threshold.
Environment
omo-ai 5.0.0-0.beta.11, same 257k BATS GPU session after switching compact to Grok 4.6. Constant lives in packages/coding-agent/src/core/compaction/stream-watchdog.ts and is used by both core compaction.ts and the builtin speculative path.
Bug
DEFAULT_SUMMARIZATION_MAX_DURATION_MSis 120_000. A large session (observed: 257k tokens) summarizing on Grok 4.6 exceeds that budget while still streaming, so compact is rejected:Tokens do not drop, so the session cannot continue (
Context remains above the compaction threshold because compaction did not complete).The 120s cap was added to stop a trickling stream from freezing the agent-event queue forever. That is a real hang hazard, but 120s is shorter than a legitimate 200k+ summary on slower models. The session then has no compact path at all.
Expected
Keep a wall-clock budget, but size it for large-session summarization (15 minutes / 900_000ms). Idle-timeout (300s silence) still kills a hung connection. A finished summary is better than a session stuck above the threshold.
Environment
omo-ai 5.0.0-0.beta.11, same 257k BATS GPU session after switching compact to Grok 4.6. Constant lives in
packages/coding-agent/src/core/compaction/stream-watchdog.tsand is used by both corecompaction.tsand the builtin speculative path.