Related ToolsClaude CodeClaudeCursorAiderCody

Cook Automates the Work-Review-Fix Loop for Claude, Codex, and OpenCode

Claude by Anthropic
Image: Anthropic

What Happened

A developer released Cook, an open-source CLI tool that automates the repetitive cycle most people fall into when using AI coding agents: issue a task, review the output, ask the agent to fix issues, review again, repeat.

Cook wraps around Claude, Codex, or OpenCode and runs them in an automatic work-review-gate loop. You issue a single command like cook "Implement dark mode" and the tool handles the iteration. The agent does the work, reviews its own output, identifies issues, fixes them, and repeats until it is satisfied with the result or hits your configured maximum number of iterations. Agents run natively by default using their own CLI interfaces.

The project was posted to Hacker News on March 7, 2026, with source code available on GitHub.

Why It Matters

If you use Claude Code, Aider, or any terminal-based coding agent regularly, you know this loop intimately. You ask for a feature, the agent builds it, you ask it to review, it finds three problems, you tell it to fix them, it fixes two and introduces a new one, and you go around again. It is tedious and it breaks your focus because you are essentially acting as a human scheduler for a process the agent could manage on its own.

Cook formalizes this into an automated pipeline. Instead of you being the one who types "now review your work" and "now fix those issues," the tool handles the iteration programmatically. The gate mechanism - where the loop stops when the agent reports satisfaction or hits the iteration cap - prevents infinite loops while still allowing multiple improvement passes.

This matters for larger tasks especially. A simple function might be fine in one pass, but implementing dark mode across an app, refactoring a module, or building out a feature with tests benefits from multiple review cycles. Automating those cycles means you can kick off the task and come back to a more polished result.

Our Take

Cook solves a real problem that anyone using AI coding agents has experienced. The work-review-fix loop is one of the biggest friction points in agent-assisted development, and it is surprising more tools have not addressed it directly.

The approach is sensible: rather than building a new agent from scratch, Cook wraps existing tools. This means you keep using Claude Code or whatever agent you prefer, and Cook just manages the iteration. That is a good design choice because it stays out of the way and does not force you to switch workflows.

There are valid concerns though. Self-review has known blindspots - agents tend to approve their own patterns and miss the same categories of issues repeatedly. A loop of self-review might converge on "the agent thinks it is good" rather than "the code is actually good." The iteration cap helps prevent runaway loops, but it does not solve the fundamental question of review quality.

The most practical use case is probably for well-scoped tasks where the definition of "done" is clear. Tasks like "add input validation to these 5 endpoints" or "convert this component from class to functional" have objective completion criteria that self-review can handle. Open-ended tasks like "improve the architecture" are where self-review loops tend to go sideways.

Still, for the daily grind of coding with agents, this is a useful addition to the toolbox. Worth trying if you find yourself constantly babysitting agent output.