Show HN: LoopFlow – loop engineering for Claude Code LoopFlow, a new open-source tool, turns Claude Code into a self-running system by allowing developers to define goals, agent pipelines, and verification gates in a YAML file. It addresses key issues like self-grading agents, runaway costs, and memory loss by using separate gate agents, hard budget limits, and persistent memory files. The tool runs entirely in the terminal without API keys or cloud dependencies. Stop prompting your coding agent. Design the loop that prompts it. LoopFlow turns Claude Code into a system that runs itself: you declare a goal, a pipeline of agents, and a verification gate in one YAML file — LoopFlow iterates until the gate passes, the budget runs out, or the attempt limit is hit. One agent writes, a different agent checks, and a memory file makes every run smarter than the last. bash $ loopflow run test-and-fix Iteration 1/3 ▸ fix … done · $0.31 · resume: claude --resume 072f1abb… ▸ review gate … gate FAIL · $0.12 │ The date parser fix only handles ISO strings; the failing test │ also feeds epoch millis. Root cause not addressed. Iteration 2/3 ▸ fix … done · $0.28 ▸ review gate … done · $0.11 ✓ success · 2 iteration s · $0.82 LoopFlow demo — release-check loop, 2 iterations For two years the workflow was: write a prompt, read the output, write the next prompt. You held the tool the whole time. That's changing. As Boris Cherny creator of Claude Code put it: "I don't prompt Claude anymore. I have loops running that prompt Claude." A loop is a recursive goal : you define what "done" looks like, and the agent iterates until it gets there. But doing this raw has three sharp edges: Agents grade their own homework. The model that wrote the fix will happily declare it works. Unattended loops burn money. A loop running itself is also a loop making mistakes — and spending tokens — unattended. The agent forgets everything between runs. Every run re-derives what the last run already learned. LoopFlow is a small, sharp tool built around exactly those three problems: | Problem | LoopFlow answer | |---|---| | Self-grading | Gates — a separate agent, with a separate persona, must output VERDICT: PASS before the loop ends | | Runaway cost | Budgets — a hard USD ceiling enforced twice: by the runner and by Claude Code's own --max-budget-usd on every step | | Amnesia | Memory — a plain Markdown file per loop, appended after every run, injected into every prompt. The agent forgets; the repo doesn't | | Collisions | Worktrees — opt-in git worktree isolation, so loops never fight you or each other for the working tree | | Auditability | Every step logs a session id — claude --resume