The Complete Claude Guide
Chapter 19 · CLI

Parallelism: worktrees, background tasks and agent view

Parallel work advances several tasks at once: worktrees give separate working copies of the repo, background tasks run in the background, and agent view centralizes managing multiple agents.

Verified against source on 2026-09-30

Video

Steps

  1. Create a worktree per parallel task so changes do not trample each other in the same working directory.
  2. Run a separate session on each worktree; each session sees its own copy and can commit separately.
  3. Push long tasks (tests, builds) to the background while the session keeps working.
  4. Agent view shows active agents and enables tracking; check progress before merging back to the main branch.

Mechanism animation (illustration)

Common pitfall: Parallelism without coordination produces merge conflicts; plan upfront which files each task touches.
Hands-on exercise: Create a worktree, make a small change in it alongside work on the main branch, and merge back. Record any conflicts.
Filmed demo · Video is added in the media phase

Recap

Comprehension check

What problem do worktrees solve?

Recap

Official sources

← Previous Back to contents Next →