Last reviewed
Correct answer: D. Give each session its own worktree, which is the thing that keeps the edits apart — a team divides work, it does not isolate files
Explanation
The principle — isolation and coordination are two different problems, and each has its own instrument. Reaching for the wrong one leaves the original symptom exactly where it was.
Why the key is correct — Anthropic separates the two in one sentence: worktrees isolate file edits, while subagents and agent teams coordinate the work itself. The isolation is what this scenario is short of, and it is described directly — worktrees give each session a separate git checkout, so parallel sessions never edit the same files, and running each Claude Code session in its own worktree means edits in one session never touch files in another, so one session can build a feature while a second fixes a bug. The proposal on the table addresses the other axis: teams decide who does what, and their own guidance says agent teams don't isolate teammates in worktrees, so the partition has to be arranged by hand. Turning two colliding sessions into a team leaves them colliding, now with a plan.
Why the others are wrong — a team does not isolate files. A worktree does not divide the work. And committing more often records the collision rather than avoiding it.
Remember this — worktrees decide where edits land; subagents and teams decide who does what. Overwriting is the first problem.
Sources — Anthropic's Claude Code documentation on running agents in parallel and on worktrees.
Sources
“They isolate file edits, while subagents and agent teams coordinate the work itself.”
“Worktrees give each session a separate git checkout, so parallel sessions never edit the same files.”
“Running each Claude Code session in its own worktree means edits in one session never touch files in another, so one session can build a feature while a second fixes a bug.”
“Agent teams don't isolate teammates in worktrees, so partition the work so each teammate owns a different set of files.”
Practise 10 questions on this topic
Take Claude Code Workflows — Timed Test 1 (10 questions) — scored instantly, explanation for every question, no login.