Claude Certified Architect – Foundations Practice Question 65: Git Worktrees Parallel Sessions

Claude Certified Architect, Foundations · Test 7 · question 5 of 10

Claude Code Configuration & Workflowsmedium

A developer wants Claude Code to build a new authentication feature in one terminal while a second Claude Code session fixes an unrelated bug in the same repository. In earlier attempts with both sessions in one working directory, the sessions overwrote each other's edits and branches got mixed. What is the recommended way to run them in parallel?

Select one answer
Show answer and explanation

Answer:

  • A. Start each session with claude --worktree and a different name, so each gets its own checkout and branch

A is correct. The Claude Code docs describe running parallel sessions with worktrees: each git worktree is a separate checkout on its own branch, and claude --worktree feature-auth (run again with a different name in a second terminal) starts an isolated parallel session, so concurrent edits do not collide.

B is wrong because auto-accept only skips permission prompts; two sessions editing one working tree still overwrite each other and nothing merges the changes. C is wrong because --continue resumes the most recent conversation in the current directory, which would not isolate the files. D is wrong because rules are instructions that shape Claude's behavior, not a locking mechanism, and Claude can still touch the files.

Reference: Common workflows - Run parallel sessions with worktrees

Practice Test 7 ›

Study guides for Claude Certified Architect, Foundations