// claude code workflow tool
A real agentic loop has a goal, sensors, and a stop condition — not just retries. Build yours in 5 steps.
↑ tap any node to see what happens at that stage
Before you build anything, understand what you are building. A working agentic loop needs all four of these. Miss one and the agent either loops forever or stops too early.
The goal is the exit condition for the entire loop. Without a concrete goal the agent does not know when to stop — so it loops forever or quits too early. Your goal must be something a sensor can confirm: a test result, a diff percentage, an HTTP status code.
Feedforward is everything you give the agent before iteration 1 — the spec, constraints, stack rules, and file boundaries. Better feedforward means the first attempt is closer to correct, which means fewer total loop cycles. Every iteration you avoid saves tokens and context.
Sensors are the commands that run after every ACT step to measure whether progress happened. Their output is what the agent reads at the next READ stage. Weak or single sensors create blind spots that lead to doom loops. Use at least two: one broad, one specific.
The harness reads sensor output after each VERIFY step and decides what happens next: another iteration, early success exit, or escalation to a human. For Claude Code, the harness is usually the agent itself guided by the loop spec you write here.
An agent stuck in a failing state without a retry cap will burn tokens indefinitely. Always set a hard cap (3–5 iterations) and an intervention trigger: when the cap is hit, stop, summarize blockers, and ask a human — never keep retrying.
Click a pattern to read the example — then switch to YOUR TURN to fill in your own project details. Complete the loops you need.
Fill in the loops your project needs above, then use the 5-step wizard to generate a copy-paste ready prompt.
// step 1 of 5
Pick the pattern that matches your task. It pre-fills sensors and examples in later steps.
// step 2 of 5
A measurable definition of done is what separates a loop from endless prompting.
What should the agent build, fix, or change?
When is this task complete? Specific enough that a sensor can confirm it.
// step 3 of 5
All fields are optional — fill what you know. Every constraint you add reduces wrong-direction iterations.
Scope what the agent is allowed to touch.
Paste a brief spec, link a doc, or describe the reference.
// step 4 of 5
After every ACT step the agent runs these commands and reads the output. At least one required.
// step 5 of 5
Rules prevent doom loops. Set the cap before you start — not after the agent is already stuck.
Maximum iterations before the loop stops. Recommended: 3–5.
What must be true for the loop to exit successfully?
What should the agent do when it hits the retry cap without passing sensors?
Write-Test, Bug-Fix, Design, Refactor and more — pre-filled and copy-paste ready. Drop your email and I'll send them when they ship.
No spam. I'll wire this to a real provider soon.
I'll send the Loop Library when it ships.
One click fills the entire wizard and generates your loop spec. Edit any step before copying.
Builds a search filter and loops until Jest tests and TypeScript checks pass.
Load this loop →Patches a 500 error and loops until logs are clean and tests pass.
Load this loop →Iterates on a layout until Playwright screenshot diffs hit zero regressions.
Load this loop →