Agent Workers currently default to creating new git worktrees for file updates, which can be overkill or surprising. User requests a user/project-level setting to configure this behavior, allowing agents to operate directly on the working tree.
## Summary Currently, when an Agent Worker in **Agents View** (`claude agents`) needs to update files inside a git repository, it defaults to creating a new git worktree and operating inside it. This is sometimes overkill (e.g. trivial single-file edits with no concurrent work) and other times surprising for users who expect the agent to operate directly on their working tree. This proposal adds a user/project-level setting in `.claude/settings.json` (and `~/.claude/settings.json`) to let users choose the default behavior. ## Proposed setting A new setting under Agents View configuration, e.g.: ```json { "agents": { "worktreeMode": "auto" // "auto" | "manual" | "worktree" } } ``` ### Modes - **`auto`** (recommended default) — A smart mode. Before editing, the agent detects whether the required changes would conflict with other activity in the repo (e.g. another Claude Code process recently used `Edit`/`MultiEdit` on the same file, or there are uncommitted local changes t