The boundaryThe verified Agent loop has no documented aggregate max-steps or per-turn spending limit. Keep an independent provider-side quota.
Thirty seconds to containment.
- Cancel the active turn.Press Esc or Ctrl+C in the running TUI. Send Ctrl+C to a foreground CLI process.
- Watch the real meter.Confirm the process and provider usage stop. A frozen screen is not proof.
- Copy the trace.Preserve Session events, terminal output, timestamps, and sanitized provider usage.
- Do not resume unchanged.Fix the reachable failure or narrow tools, task, and budget before a fresh Session.
Know what each control bounds.
maxParallelToolCallsOne-step concurrencyNot total steps, calls, tokens, or spend.
maxTokensOne response outputNot accumulated input across repeated steps.
compactionContext pressureNot the number of model requests.
provider quotaExternal consumptionThe independent hard cost boundary.
Route the repetition.
Reduce the reachable tool surface and require a concrete done condition.
Remove or repair the error source before another turn can reach it.
Separate transport retries from successful Agent steps.
Stop child processes, schedules, and detached work explicitly.
Bring an event timeline.
Version + source commit:
Profile + model route:
Turn start / cancel / last charge:
Repeated assistant and tool events:
Sanitized tool result or error:
Request usage + provider curve:
Smallest bounded reproduction:
Recover with a smaller blast radius.
New Sessiondisposable workspace
→
Few toolsread-only first
→
Small quotaprovider enforced
→
One tracecancel on repetition
Primary evidence.
- Verified Agent loop implementation
- Agent loop configuration contract
- Upstream runaway-loop report #3228
- Upstream runaway-loop report #3229
Keep the complete runbook.
The canonical guide adds failure branches, a diagnostic bundle, recovery rehearsal, and third-party budget-plugin caveats.
Read and star on GitHub