Doom-Loop Breaker
Sometimes an agent gets stuck: it fixes one test and breaks another, then undoes its own fix, runs the same failing check again and again, or keeps repeating a step that changes nothing. The Doom-Loop Breaker spots that, makes the agent stop and rethink with the evidence, and pauses the run to ask you only if the loop comes back.
Turn it on
It is on by default. Find it in Settings › Agent tools › Doom-loop breaker (also listed in Settings › Features and the first-run setup).
| Setting | Default | Effect |
|---|---|---|
Pause the agent when it is stuck in a loop (ingot.agent.doomLoop.enabled) | on | watch runs for loops |
Same error or step repeats before the loop breaker steps in (ingot.agent.doomLoop.maxRepeats) | 3 | how often the same failure or the same step may come back |
Times the agent rethinks before it pauses (ingot.agent.doomLoop.reflections) | 1 | reflection steps before the run pauses; 0 pauses at once |
What it looks for
| Signal | Example |
|---|---|
| same error | the same error signature comes back 3 times, for example npm test failing on the same assertion |
| same step | the same tool call with the same arguments 3 times with no edit in between |
| no progress | twice as many steps in a row that change nothing and find nothing new |
| fix and break | an edit puts a file back to a version that already failed |
| contradicting claims | the agent says "fixed" and the next check fails, twice |
Numbers, paths and timestamps are ignored when comparing errors, so TypeError at cart.ts:41 and TypeError at cart.ts:44 count as the same error.
First: the agent rethinks
The first time a loop is found, the run does not stop. A small card appears in the chat:
Loop spotted · rethinking Same error again · 1 of 1
The same error came back 3 times: "npm error missing script: "build"".
What it tried opens the list of steps behind it. The agent gets the same evidence and must say in two sentences what keeps failing and why, then change strategy: a different fix, a different file, or a fresh look at the error and the code.
Then: the run pauses and asks
If the loop comes back after the allowed reflections (the second time is enough), the run stops before its next step and a card shows above the composer, for example Paused · Same error again, with Here's what I tried:
Here's what I tried:
1. npm run build → "npm error missing script: "build""
2. npm run build → "npm error missing script: "build""
| Choice | Result |
|---|---|
| Try a different approach | the run continues, and the agent is told which approaches failed and must not repeat them |
| Reset | the files go back to before your last message; the chat stays |
| Keep going | the run continues as it was; it pauses again if the loop goes on |
| Stop here | the run ends; your files keep their current state |
Don't-do-this-here habits
When the run pauses, the failed approach is saved to .ingot/anti-habits.md, so no agent tries it again in this project:
# Anti-habits
- Don't: Editing src/cart.js then npm test while "assertionerror: expected n, got n" kept failing
The agent sees the newest lines before it starts. Delete a line to forget it.
Rex
Rex runs follow the same rule on the server: the same call with the same result, or the same check failing 3 times in a row (whatever its output), makes Rex rethink once, and only a loop that comes back stops the run. It is on by default; the agent.loopBreaker switch of Rex's settings turns it off.
Silver notes
| Note | When |
|---|---|
| Saved to Habits | a failed approach was saved as a don't do this here line |