How I run 4 coding agents at once without reading a single transcript
说明与用途
作者说明如何通过为每个任务创建独立的 git worktree、集中管理代理请求以及使用结构化报告来同时运行四个 AI 代码代理,从而避免冲突并减少审查时间。
问题
Managing multiple AI coding agents simultaneously leads to overlapping edits, missed prompts, and excessive transcript scrolling.
结果
The workflow reduces lost edits, centralizes agent prompts, shortens review time to ~20 seconds per task, and enables one-click shipping of changes.
工作流
- Create a dedicated worktree and branch for each task using
git worktree add -b <branch> <path> origin/main - Run the agent with a prompt, e.g.,
claude "fix the flaky auth test" - Allow the agent to ask questions via the
ask_usertool; collect all questions in a single list - Configure the agent to output a structured report: hero line, diff, test results, callout, next steps
- Review the report; if correct, ship by committing, pushing, and opening a PR with one click; if CI fails, reopen the same session with
claude --resumeorcodex resume - Use the wisp tool to automate these steps and manage multiple agents concurrently
证据
Two agents in one checkout will eventually overwrite each other. Not with an error: session A fixes a file, session B (working from what it read 20 minutes ago) rewrites the same file, and A's fix is quietly gone.
Give the agent an explicit way to ask (an MCP tool like ask_user works with Claude Code, Codex and opencode), and route every question into one list.
So I ask the agent to end with a small structured report (a hero line, a diff, a test result, a callout, next steps) instead of prose.
If the report looks right, the next step is always the same: commit, push, open a PR, watch CI.
- 记录日期: 2026-10-25T02:11:19.357Z