Claude Code
Today
Explore
Practice
Library
Exam
Certificate
Search
⌘K
ខ្មែរ
◐
Sign in
Today
Explore
Practice
Library
Profile
Parallel Sessions and Worktrees
Today
5. Optional: Delegation · 4 of 4
Mark read
Prev
Next
Orient
Isolate on disk first, then choose the coordination level
Split one repository into two safe workstreams
Predict
Run a Writer/Reviewer pair in worktrees
Close
Practice
Related
Parallel Sessions and Worktrees
Advanced
☆
📑
More than one Claude at once, without two of them editing the same file
Orient
Isolate on disk first, then choose the coordination level
Split one repository into two safe workstreams
Predict
Run a Writer/Reviewer pair in worktrees
Close
Practice
Related
Practice activities and scenarios are optional. Mark the lesson complete after reading, and return to practice whenever it helps.
Restoring your saved work…
07
Optional practice
🧠 Optional scenario practice
Q1
Why do two Claude Code sessions in the same directory risk overwriting each other?
A
Sessions share a single context window
B
A session's view of the code is the directory it was started in, so both are writers on one working tree with no locking
C
Claude Code caches file contents globally
D
Only one session can hold the git index at a time
Q2
You give two parallel sessions separate worktrees. What can still collide?
A
Nothing — worktrees provide complete isolation
B
Shared external resources like a dev server port, a local database, or a remote branch
C
Their CLAUDE.md files
D
Their context windows
08
Up Next
Advanced
Non-Interactive Mode
Advanced
Fan-Out and Batch Work
Advanced
Scheduled and CI Work
📝 Notes
Mark lesson complete
Next: Non-Interactive Mode →