Desktop app: new-session worktree checkbox is sticky and invisible afterward — sessions silently start in a worktree

Status Open
Maintainer reply None cached
Activity 0 comments · opened Aug 26, 2026

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:

  1. 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 branch worktree-<session-name>. My git push origin master from 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.
  1. Worktrees accumulate silently. ~/.claude.json had 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

  1. Show the state in-session. A persistent badge on the session — "isolated worktree: <branch>" — so it is impossible to be in one without knowing.
  2. Surface it in config. Write the preference somewhere inspectable (~/.claude.json or settings.json) and expose it in /status, so it can be found and unset without reading leveldb.
  3. 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.

View original on GitHub ↗