Recipes / Dev & code
Multi-agentFull setupDev & code

Done-when lists, a two-try stop rule, and review by how hard it is to undo

One lead agent (Claude Code or Codex) splits each task into bounded pieces for other models in separate worktrees, checks every report against a done-when list, and scales review to how hard a change is to undo.

From trach on X · Oct 2026

Setup time1 hour to set up
CostYour Claude + Codex plans
RunsEvery task, plus a weekly retro
NeedsClaude Code or Codex, git worktrees, CI
Last updated2026-10-18

What the source did

  • Works from Claude Code or Codex (whichever is best at the time) and calls the others in: Codex for independent reviews and long builds, a small model for sandboxed jobs, Grok Bot for X research that comes back to the session.
  • Every task starts with a "done when" list a program can check.
  • The lead agent hands bounded pieces to other models or subagents, each in its own git worktree.
  • A fast judge model compares each worker's report with the done-when list and points to what to check first; the real checks still run.
  • A loop that makes no progress after two tries stops and the plan is rethought.
  • Review depth follows how hard a change is to undo: routine changes merge once CI passes, critical ones wait for an independent review, live systems follow a written protocol.
  • Every real incident becomes a small automatic check, and a weekly retro reads the past week's sessions and bookmarks and suggests changes.
  • One instructions file and one skills library are shared by Claude Code and Codex; every change goes through a pull request and CI.
“A loop that makes no progress after two tries stops, and the plan gets rethought instead of retried”— trach (@tracheopteryx), X

Summary written by Agent Cookbook. See the original for the full context.

Tools they used

Made and published by trach. Start here; it is their original, not ours.

Our adapted version

Ours Our version: his workflow rules combined into one instructions file. Built from trach's post, not his wording. Fill in the [BRACKETS].

WORKFLOW RULES (shared by every agent in this repo) 1. Before any work, write DONE WHEN: a short list of checks a program can run (tests, commands, file exists, CI green). No task starts without it. 2. Split the work into bounded pieces. Each piece runs in its own git worktree with its own DONE WHEN subset. 3. When a worker reports back, compare its report with DONE WHEN, list what to verify first, then run the real checks. A report is not proof. 4. If a loop makes no progress after two tries, stop. Write what failed and propose a new plan instead of retrying. 5. Review by how hard the change is to undo: - Routine and easy to revert: merge after CI passes. - Critical (data, auth, billing, migrations): wait for an independent review by a different model, and a human merges. - Live systems: follow docs/live-protocol.md step by step. 6. Every real incident gets a small automatic check added so it can't repeat silently. 7. Every change goes through a pull request and CI. WEEKLY: read this week's sessions and notes, and suggest up to 3 changes to these rules. Don't apply them without my OK.

Approval rule

🛡
Critical changes wait for an independent review and you merge. Sending, buying, posting, and deleting always need a human.

Set it up

  1. Save the rules as the one instructions file both agents read (for example CLAUDE.md and AGENTS.md pointing at the same file).
  2. Write a short live-systems protocol if you run anything in production.
  3. Start every task by asking the lead agent for the DONE WHEN list and approve it before work begins.
  4. Let it hand pieces to a second model or subagents in separate worktrees.
  5. After each incident, ask for the one automatic check that would have caught it.
  6. Schedule the weekly retro and accept or reject its suggestions yourself.

Common failures

⚠
  • Done-when items a program can't check ("looks good"). Make them runnable.
  • Trusting a worker's summary instead of running the checks.
  • Retrying the same failing plan a third time.

Variations

  • Use any cheap, fast model as the judge that triages worker reports.
  • Add his X Search plugin so agents can check the exact posts a research bot cites.

Get the 10 best agent setups. Free.

Plus new recipes every week. One email, no spam.

Unsubscribe anytime. Privacy

Related recipes

Get their template ↗