Docs say every desktop "+ New session" gets its own worktree; on 2.1.222 (Windows) it runs in the main checkout with no worktree created
Summary
The desktop docs state that each new session in a Git repository gets its own worktree. On Claude Code 2.1.222 (Windows 11, desktop app), a session started with "+ New session" runs in the main checkout on the repository's current branch, and no worktree is created. Either the documentation overstates the behaviour or the worktree creation is silently not happening.
Three closed issues (#31896, #27971, #57484) requested an option to disable automatic worktree creation, one of which appears resolved — but no opt-out setting is documented in the settings reference, where worktree.baseRef is the only worktree key listed.
What the docs say
From https://code.claude.com/docs/en/desktop :
Click + New session in the sidebar ... For Git repositories, each session gets its own isolated copy of your project using Git worktrees, so changes in one session don't affect other sessions until you commit them.
And from https://code.claude.com/docs/en/worktrees :
In the desktop app, every new session gets its own worktree automatically.
What actually happens
Session started via "+ New session" in the Code tab, on a git repository:
git rev-parse --show-toplevelreturns the main checkout path, not a worktreegit rev-parse --abbrev-ref HEADreturnsmaingit worktree listshows only the main checkout (plus one unrelated worktree created by hand long ago).claude/worktrees/does not exist
No worktree key is present in the project's .claude/settings.local.json or in ~/.claude/settings.json.
Environment
- Claude Code 2.1.222, desktop app, Code tab
- Windows 11 Pro (22631)
- Git for Windows installed and working
- Repository sits inside a Google Drive synced folder (noted in case directory syncing affects worktree creation)
Why it matters
Whether sessions are isolated changes what is safe to do in parallel. With isolation, two sessions edit separate copies of a file and neither sees the other's changes until a merge; without it, they write the same file. Tooling and workflows built on the documented behaviour will be wrong on this setup, and there is no visible signal telling the user which model is in force.
Question
Did an opt-out for automatic worktree creation ship (issue #57484 reads as resolved)? If so, it doesn't appear in the settings reference, and the desktop and worktrees pages still describe automatic creation as unconditional — so a user can't tell whether their sessions are isolated. If no opt-out shipped, then this is a bug: a "+ New session" on a git repository is running in the main checkout with no worktree created.