How each harness creates an isolated checkout, what it starts from, and what happens to the changes afterward. Worktrees isolate files; conversation forks and subagent context are separate. Unknown answers mark gaps in the recorded evidence, not proof that a capability is absent.
Forking: conversation history and file isolation
Subagents: delegation and workspace isolation
| Question | Claude Codechecked at 2.1.310 |
|---|---|
| Create or enter | Use |
| Starting state | The default |
| Session isolation | The whole session can enter a worktree, and |
| Subagent isolation | Request worktree isolation or set |
| Setup and environment files | Install dependencies in the fresh checkout. |
| Review and integrate changes | Partly Changes stay on the worktree branch for review and integration. Keeping a checkout preserves its files and branch; removing it can discard that work. The documented lifecycle does not promise automatic integration. |
| Exit and cleanup | Interactive exit checks for local work and new commits before offering keep/remove; a clean unnamed worktree can be removed automatically. Named sessions, submodules and inability to verify state affect cleanup. See the source for the full rules; no cleanup runtime probe was run. 2.1.311 publisher fixes an isolated subagent worktree being removed while a background subagent it spawned is still working there. This supplements the 2.1.310 documentation baseline; no cleanup runtime probe. |
| CLI, tools and APIs | The CLI supports |
Commands
From your shell
Commands you run in a terminal or script, outside a session.
| Task | Claude Codechecked at 2.1.296 |
|---|---|
| Set up | |
| Create | Create or reopen a session worktree; alias -w. |
Notes and sources
Claude Code, 2 sources
- Publisher documentation reviewed against the 2.1.310 baseline; implementation unavailable and no lifecycle runtime probe.