Desktop app: worktree.bgIsolation setting has no effect on interactive session worktree creation

Open 💬 0 comments Opened Jul 10, 2026 by david-fleischmann

Description

In the Claude Code macOS desktop app, every new session started in a git repository automatically creates an isolated git worktree/branch, with a "Worktree" toggle chip shown in the composer bar (checked by default, per-project/session).

I set worktree.bgIsolation: "none" in my project's .claude/settings.json expecting it to disable this automatic worktree creation for new sessions:

{
  "worktree": {
    "bgIsolation": "none"
  }
}

Per the settings schema, bgIsolation is documented as: "Isolation mode for background sessions in this repo. 'worktree' (default) blocks Edit/Write in the main checkout until EnterWorktree is called. 'none' lets background jobs edit the working copy directly."

However, this setting only affects background jobs (TaskCreate/Agent background execution) — it has no effect on regular interactive/foreground sessions started via the desktop app UI. New sessions in that project still automatically create a worktree/branch, and the "Worktree" toggle chip in the composer must be manually unchecked every single time — there's no way to persist a default of "off" for interactive sessions.

Expected behavior

The "Worktree" toggle chip in the desktop app composer should respect the project's .claude/settings.json worktree configuration. Specifically:

  • If a project-level setting exists to default interactive sessions to no-worktree-isolation (or if bgIsolation: "none" is intended to apply broadly), the UI toggle should reflect that default — pre-unchecked and ideally grayed out/disabled to signal it's controlled by settings, rather than requiring the user to manually toggle it off on every new session.
  • If bgIsolation is intentionally scoped to background jobs only, then a separate, documented setting should exist to control the default state of the interactive "Worktree" toggle per project.

Actual behavior

  • bgIsolation: "none" has no effect on interactive desktop sessions.
  • The "Worktree" toggle is pure per-session UI state with no persistable default.
  • Users working in personal/single-maintainer repos (e.g., a simple git-based note/knowledge repo, not a team codebase) end up with worktree branches piling up on every new session, requiring manual merge-back into main each time — undermining the light "version history" use case for git in such repos.

Environment

  • Claude Code Desktop app (macOS)
  • Project-level .claude/settings.json, not global ~/.claude/settings.json

Suggested fix

Either:

  1. Make worktree.bgIsolation: "none" (or a new dedicated setting) also apply to interactive/foreground sessions, defaulting the composer's "Worktree" toggle to unchecked for that project, and gray it out to communicate it's settings-controlled, or
  2. Document clearly that this only applies to background jobs, and add a distinct, settings.json-configurable default for the interactive toggle.

View original on GitHub ↗