Skip to content

Loop breaker

Stop paying for attempt four

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.

Get FlowKy free

No card · Your agent, your plan

Circuit breaker · per-session state

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.

How it works

  1. Failures are fingerprinted

    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.

  2. The third strike is called out

    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.

  3. The real error gets surfaced

    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.

Fair questions

Will it get in the way of legitimate retries?
Only a third failure of the same command with the same error trips it, and then it pauses one run: sent again, that run goes through. A different error, a success or /flowky:retry resets the count; an edit does not. Errors that look like network errors need five failures and are never paused.
Do I have to configure it?
No. It is on from install and counts per session. You can set it to a note that never pauses, or switch it off.
Get FlowKy free

No card · Your agent, your plan

Also in FlowKy for Claude Code