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
{{ message }}
Repository navigation
run --max-turns does not bound overflow-and-compact cycles that fail before a step starts #1813
With altimate-code run --max-turns N and no --time-budget, a request the provider rejects as a context overflow before streaming any step hands off to compaction. Compaction steps are not charged, and no work step ever starts, so the turn budget never sees the cycle. If the request after each compaction overflows again the same way, the run can loop indefinitely. The compaction circuit breaker resets after every successful compaction, so it doesn't stop this.
This behaviour predates the turn-accounting change in #1811 (it exists on v0.12.12). Steps that overflow mid-stream are charged and bounded.
Steps to reproduce
Hard to trigger with real providers. Simulated: an attached session whose every request emits a ContextOverflowError session error before any step-start, followed by a compaction step. With --max-turns 1 the run never ends.
Expected: such cycles are bounded under --max-turns (for example by counting pre-step overflows toward the budget, or capping consecutive compactions), without charging normal retries.
Activity
fix: preserve the committed-answer echo exemption at the recovery bou…