Option to disable automatic worktree isolation in Claude Code Desktop

Resolved 💬 3 comments Opened Apr 17, 2026 by erkena-dev Closed Apr 21, 2026

Summary

Claude Code Desktop (CCD) creates a new git worktree under <repo>/.claude/worktrees/<name>/ for every session and runs the session inside it. This is always-on with no way to disable it. Please add a setting to run sessions directly in the repo's checked-out working directory instead, matching the VS Code extension's behavior.

Use case

I use both the VS Code extension and CCD against the same repo (solo dev, single project). The extension edits my checked-out branch directly — changes show up in external git status, match my terminal's mental model, and integrate with my existing git workflow.

When I opened the same repo in CCD for the first time today, I didn't realize a worktree was being created. I asked CCD to update a file, it reported success, but when I ran git status in my terminal I saw no changes to that file — because the edit had landed in .claude/worktrees/<name>/FILE.md, not the real repo. I only discovered this after investigating why the edit "disappeared."

Even once understood, the model is friction for my workflow:

  • Edits don't appear in external git status until the CCD branch is merged.
  • I end up with duplicate copies of files (worktree vs. main repo) that can drift.
  • Switching between VS Code extension and CCD on the same task means the two interfaces have different working copies of the same files.

Request

Add a setting (CLI flag, settings.json key, or Settings UI toggle) to disable automatic worktree creation for the session and run in the repo's actual CWD. Something like:

  • Settings → Claude Code → \"Use worktree isolation: [Always / Never / Ask per session]\"
  • or \\"worktreeIsolation\": false\ in settings.json
  • or a \--no-worktree\ CLI flag

Worktree isolation makes sense for parallel agent sessions or risky autonomous work. For a single solo dev alternating between interfaces on the same branch, it's the opposite of what I want.

What I considered

  • \"Worktree location\" setting — only relocates the worktree, doesn't disable it.
  • Branch prefix setting — cosmetic only.
  • Per-agent \isolation: \"worktree\"\ flag exists for spawned subagents, suggesting the concept of opt-in isolation is already in the codebase; please extend it to the top-level session.

Thanks.

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗