You know this one
Each step looks sensible on its own
That is exactly why it never stops. A failing loop reads as reasonable from inside, and every retry costs the same tokens as the first honest attempt — spent on learning nothing.
Loop breaker
Build fails. The agent changes a type, runs the same command, fails the same way. FlowKy counts: on the third identical failure Claude is told so, with the error line it kept skipping past, and the next identical run is paused once. A command piped into a filter such as | tail, without pipefail, is not seen.
No card · Your agent, your plan
✕ npm run build
✕ npm run build
✕ npm run build
paused once · try another way
Circuit breaker · per-session state
You know this one
That is exactly why it never stops. A failing loop reads as reasonable from inside, and every retry costs the same tokens as the first honest attempt — spent on learning nothing.
Same shell command, same exit code, same first error line, with numbers, paths and timings masked: that is the same failure, and FlowKy counts it per session rather than trusting the agent to notice its own circles. Editing files in between does not reset the count, so three runs of a test suite can count as the same failure while different tests fail.
On the third identical failure, Claude is told that running the command as it is will fail the same way. The next identical run is paused once; sent again, it runs.
The note quotes the first error line of the output, the one the agent glossed over, so the next attempt can be a different attempt, not the same one with a new type annotation.
No card · Your agent, your plan