Skip to content

Loop Troubleshooting

Read the loop stop reason before changing code:

Stop reasonFirst check
ceilingIncrease maxIterations only if the state is making progress.
timeoutInspect the last checkpoint and backend output.
stuckConfirm the state transition changes the measured state.
budget-exhaustedCheck whether the backend reports token usage.
unfixableRead the failing gate or issue payload.
cancelledCheck caller or supervisor shutdown.

If a loop keeps repeating, improve the measure, tighten the state transition, or switch to a purpose-built preset.