[FEATURE] option to disable auto-worktree in Desktop app
Preflight Checklist
- [x] I have searched existing requests and this feature hasn't been requested yet
- [x] This is a single feature request (not multiple features)
Problem Statement
The Claude Desktop Mac App automatically creates a new git worktree for every Claude Code session. There is no setting to disable this behavior.
This causes repeated issues for projects that rely on gitignored configuration files — specifically .env and .mcp.json for MCP server connections. Since these files are gitignored, they don't exist in the new worktree, and MCP servers fail to connect at the start of every session.
The terminal CLI does not have this problem — it uses the main repo directory by default and only creates worktrees when explicitly requested via /worktree.
Environment
Claude Desktop Mac App
macOS
Project uses MCP servers (Snowflake, MySQL) configured via .mcp.json with credentials in .env
Proposed Solution
A setting (e.g., Settings → Claude Code → "Use worktrees") to disable automatic worktree creation, so Desktop sessions behave like terminal sessions and use the main project directory.
Alternative Solutions
Workarounds attempted
Symlinking .env and .mcp.json into each worktree — works but must be repeated for every new session
Using absolute paths in .mcp.json — helps with some path resolution but doesn't solve the missing .env problem
Priority
Low - Nice to have
Feature Category
Configuration and settings
Use Case Example
_No response_
Additional Context
_No response_
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗