Desktop app: new-session worktree checkbox is sticky and invisible afterward — sessions silently start in a worktree
Summary
The new-session ("cc landing") screen in the desktop app has a worktree checkbox. Its state is persisted and there is no indication afterward that it is on. Once checked — including by accident — every subsequent new session silently starts in a git worktree on a generated branch, with no per-session confirmation and no visible in-session marker.
Evidence
The toggle persists to the app's localStorage under:
persisted.cc-landing-worktree-enabled
(found in ~/Library/Application Support/Claude/Local Storage/leveldb)
Nothing in ~/.claude.json, ~/.claude/settings.json, or the project's .claude/settings.json records the user's choice. The only related key is cachedGrowthBookFeatures.tengu_worktree_mode: true, which is a server-side feature gate, not the preference. So the setting cannot be found, inspected, or unset from the CLI or from any config file — the only way to discover it is to decode the app's leveldb.
Impact
I checked the box once by accident and did not realize it. Consequences:
- I asked the agent to make a small edit "right in master." The session had already been started in a worktree, so the edits landed in
../<repo>_worktrees/<session-name>on branchworktree-<session-name>. Mygit push origin masterfrom the main checkout pushed successfully and did not contain them. It took a deploy notification plus a multi-step investigation to work out why the change wasn't live.
- Worktrees accumulate silently.
~/.claude.jsonhad recorded seven auto-created ones with generated names (serene-burnell-688503,zen-satoshi-f57ace,awesome-dewdney-fd20ff,relaxed-nightingale-5d45d0,cranky-chandrasekhar-0c735d,affectionate-sutherland-1a419c,sharp-ishizaka-63feff) under<repo>/.claude/worktrees/. I never knowingly asked for any of them.
Requests
- Show the state in-session. A persistent badge on the session — "isolated worktree:
<branch>" — so it is impossible to be in one without knowing. - Surface it in config. Write the preference somewhere inspectable (
~/.claude.jsonor settings.json) and expose it in/status, so it can be found and unset without reading leveldb. - Reconsider the stickiness. A checkbox that silently changes where every future session writes code is a large, invisible default. Either default it off per session, or confirm it on the session that inherits it.