Lesson 05 · Loop Engineering
Isolation removes the collision. It does not remove you.
The moment you run more than one agent, the files start to collide. Osmani's comparison is exact: two agents writing the same file is the same headache as two engineers committing to the same lines with nobody talking to each other.
A git worktree is a separate working directory on its own branch, sharing the same repo history. So one agent's edits literally cannot touch the other one's checkout.
# one checkout per piece of work
git worktree add ../repo-auth-fix -b fix/auth-timeout
git worktree add ../repo-flaky -b fix/flaky-session
# and when the work lands
git worktree remove ../repo-auth-fix
Claude Code gives you three routes to the same isolation: plain
git worktree, a --worktree flag to open a session in its own
checkout, and isolation: worktree on a sub-agent, so each helper gets a
fresh checkout that cleans itself up afterwards. The Codex app builds worktree support
straight in, one per thread.
Here is the lesson inside the lesson. Osmani wrote a whole post called the orchestration tax, and he summarises it in one line:
The worktrees take away the mechanical collision but YOU are still the ceiling, your review bandwith decides how many you can actually run, not the tool. Addy Osmani, Loop Engineering
So the right question is never "how many agents can I launch". It is how many diffs can I genuinely read today. Set your parallelism to that number.
What does a git worktree give two parallel agents?
What actually caps how many agents you should run in parallel?
How many agent-produced diffs did you truly read last week? Write the number, then your parallelism limit.
Primary source: The orchestration tax by Addy Osmani. It is the human half of this lesson and the more important half.