You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When timeout-compaction runs but does not actually reduce the context (e.g., the compaction model produces output but fails to summarize effectively), the system doesn't escalate to a different approach. It logs [timeout-compaction] compaction did not reduce context and falls through to normal error handling, which means the user gets a "Context overflow" error.
Observed log
[timeout-compaction] compaction did not reduce context for azure/grok-4-1-fast-reasoning;
falling through to normal handling
Root cause
In run.ts, the timeout-compaction path:
Detects timeout + high context usage
Triggers compaction with the current model
If compaction "succeeds" (no error) but context is still over threshold → falls through
No escalation to compact_then_truncate, no model switch, no session rotation
The system treats "compaction ran but didn't help" as unrecoverable, when there are still options:
Try a different model with better summarization capability
Escalate to compact_then_truncate (aggressive mode)
Force session rotation with a handoff summary
Expected behavior
After compaction completes but context is still over threshold:
Bug
When timeout-compaction runs but does not actually reduce the context (e.g., the compaction model produces output but fails to summarize effectively), the system doesn't escalate to a different approach. It logs
[timeout-compaction] compaction did not reduce contextand falls through to normal error handling, which means the user gets a "Context overflow" error.Observed log
Root cause
In
run.ts, the timeout-compaction path:compact_then_truncate, no model switch, no session rotationThe system treats "compaction ran but didn't help" as unrecoverable, when there are still options:
compact_then_truncate(aggressive mode)Expected behavior
After compaction completes but context is still over threshold:
compact_then_truncatemodeRelated