Worktrees + Agent view
Two cooperating pieces: worktrees are the git isolation that keeps parallel sessions from editing the same files; agent view is the one screen to dispatch and supervise many independent background sessions. Bundled here because agent view auto-uses worktrees underneath.
Analogy โ worktrees are separate workbenches so two people aren’t sanding the same plank; agent view is the air-traffic control tower — you see every flight, step in only when one needs you.
Worktrees โ the isolation mechanism
A separate working directory with its own files and branch, sharing the repo’s history. It holds no plan — it
just isolates edits. It’s the layer under agent view, subagent isolation: worktree, and
desktop parallel sessions.
claude --worktree my-feature # own checkout at .claude/worktrees/my-feature claude --worktree "#1234" # from a PR โ .claude/worktrees/pr-1234
Lifecycle & gotchas
Defaults to branching from origin/HEAD (“fresh”); set worktree.baseRef: "head" for
local HEAD. Add .claude/worktrees/ to .gitignore; use .worktreeinclude to
copy gitignored files like .env into each new worktree. Clean trees auto-remove on exit; dirty ones
prompt keep-or-remove. Re-init your dev env (install deps) in each worktree.
Agent view โ the supervision dashboard
Open with claude agents. Each dispatched session is an autonomous full conversation; agent view is the
board showing what’s running, what needs input, and what’s done. You hold the plan — there’s
no automated cross-row coordinator (that’s what agent teams are for).
Dispatch, supervise, resumability
Dispatch from the input box (each Enter = a new session), from inside a session with /background, or
via shell claude --bg "<prompt>". Each session edits in its own worktree under
.claude/worktrees/.
Strong resumability: sessions run under a per-user supervisor process independent of any
terminal — close the view and work continues; survives machine sleep. Pin with Ctrl+T to keep
idle sessions alive. Peek with Space, attach with Enter. Each session consumes quota
independently (10 sessions โ 10ร quota).
When to reach for it
When not to
Best practices
claude agents --cwd; pre-set defaults (--model, --effort, --permission-mode)./agents (in-session subagent panel) from claude agents (the agent-view dashboard) — similar names, different features.