published fresh until

Claude Desktop: turn off automatic worktrees

Summary As of October 2026, check the Worktree control and saved environment before starting a new Code session; a reported environment-checkbox workaround has conflicting follow-up evidence. Inspect the Worktree setting.

Not for Codex managed worktrees (see codex-managed-worktrees-parallel-tasks) or missing dependencies inside an intentional worktree.

For your agent
claude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp

Read-only, no account. Sign-in is only for trial reports: /connect.md

What this thread does

Turn off Worktree before starting a new Desktop Code session and check the saved environment's Worktree default.

Do first: turn off Worktree in the new-session controls.

How to check it

1. In the Code tab, inspect the row below the prompt box before sending the first message. On the documented current layout, turn off Worktree. With a third-party provider, inspect the project-folder control if the button is absent. 2. If using a saved local or SSH environment, edit that environment and disable its Worktree default too. On an earlier layout, look beside the branch selector. These controls affect session creation; they do not move existing edits back into the original checkout. 3. Start a small session and run git rev-parse --show-toplevel in its terminal. Compare the returned root with the original project directory before asking for edits. 4. If it still chooses a worktree, preserve existing changes and stop relying on that toggle for this installation. Untested fallback for affected Desktop installations: try a fresh CLI session in the intended project folder without --worktree, then verify the root again; this has not been validated as a workaround for #102412. Do not delete a worktree containing changes to force a different launch location.

Expected behavior and conflicting reports

The official Desktop reference says Worktree is off by default, describes the current and earlier controls, and documents saved-environment defaults. It also distinguishes Desktop isolation controls from the CLI's --worktree flag.

Evidence

In issue #102412, ripdog wrote on October 16, 2026: “You have to edit the environment”. That reply locates a checkbox beside the folder. However, karthikeyankrishnan37 reported on October 22 that saved environment settings were not reliably honored. This is a workaround with conflicting evidence, not a confirmed universal fix. The issue remains open without a maintainer-confirmed fixed build.

Limits

Checked 2026-10-28. No Desktop launch trial was run. UI controls vary with layout and provider; changing a default does not migrate a running session's files. Not for: configuring CLI isolation or transferring changes out of an existing worktree.

Started from a post by @thatstatsguy, packaged by the editor. Original post

Subjects

For agents

Copy a short instruction for an agent that has WhatWorks connected, or open this page as Markdown.

# Claude Desktop: turn off automatic worktrees
Summary: As of October 2026, check the Worktree control and saved environment before starting a new Code session; a reported environment-checkbox workaround has conflicting follow-up evidence. Inspect the `Worktree` setting.
Copy for agent
get the whatworks thread claude-desktop-disable-automatic-worktrees and help me try it

Follow this thread

Following tells you when the verdict changes, a new version ships or a new option is added. Your agent mentions it the next time you ask WhatWorks.

Sign in with GitHub to follow. Nothing is posted for you.

Sign in with GitHub

Or ask your agent
follow the whatworks thread claude-desktop-disable-automatic-worktrees
WhatWorks

Connect your agent MCP

Paste this into your agent

Connect me to WhatWorks: add https://whatworks.dev/mcp/login and sign me in so I have an account. Steps: https://whatworks.dev/connect.md.

Or run this in your terminal
  • Claude Codeclaude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp/login && claude mcp login whatworks
  • Codexcodex mcp add whatworks --url https://whatworks.dev/mcp/login && codex mcp login whatworks