What the source did
- One commenter runs several headless instances in tmux and chains tasks with a bash script.
- Another suggests layering: CLAUDE.md rules, then a few skills, then a typecheck hook.
- Another lays out a safe automation shape that ends in human approval before merge.
Summary written by Agent Cookbook from the original post. See the original for the full context. How we source recipes
Our notes
- What it takes
- A task file per job, claude -p with a narrow --allowedTools list, and checks that run outside the agent. One commenter chains tasks with a bash script in tmux; another keeps a run ledger with the task record, artifacts and a handoff per run.
- Where it breaks
- Automating plan approval too early, which a commenter warns against, and a CLAUDE.md that keeps growing; one commenter keeps it under about 100 lines and moves the rest into skills and hooks.
- Human checkpoint
- A human approves the plan and the merge; the checks run outside the agent and the script never merges.
- Tools involved
- Claude Code (claude -p), scripts or CI
✓ Verified Source link checked and still live. Notes by Thomas, editor. How we verify
Copy the prompt
Ours Our version, based on what r/ClaudeCode described. Not their wording. Fill in the [BRACKETS].
Approval rule
Set it up
- Write a task file per job.
- Run claude -p with --allowedTools limited to what the task needs.
- Run checks outside the agent.
- Review handoff.md and approve the merge.
Common failures
- Automating plan approval too early.
- No artifact means you can't tell the run happened; always write handoff.md.
Variations
- Same pattern with codex exec.
Get the 10 best agent setups. Free.
Plus new recipes every week. One email, no spam.
Unsubscribe anytime. Privacy