[MODEL] Claude leans towards git worktrees despite includeGitInstructions=false and instructions not to use git

Status Open
Reported on v2.1.283
Maintainer reply None cached
Activity 1 comment · opened Sep 28, 2026

Preflight Checklist

  • [x] I have searched existing issues for similar behavior reports
  • [x] This report does NOT contain sensitive information (API keys, passwords, etc.)

Type of Behavior Issue

Claude ignored my instructions or configuration

What You Asked Claude to Do

Reproduced twice today under different circumstances:
1) Asked Claude to review the latest changes.
2) Asked Claude to implement items from a TODO list.

What Claude Actually Did

In the first case, Claude spawned subagents with worktree isolation. However, they were based on the default branch, not the one I was working on, making their output unusable (might be a separate bug). In the second case, I stopped Claude before it spawned the subagents when I saw it was going to do this again.

Expected Behavior

When includeGitInstructions is set to false in the settings, I expect the system instructions to not nudge Claude into using git unless I explicitly ask for it. My user-level instructions also tell it not to use git unless I approve of its usage for the given task.
I also expect Claude to implement code changes itself, not delegate these to subagents. Previously, Claude would mostly delegate research tasks to subagents, which are easy to run in parallel. Delegating implementation tasks and using worktrees for this is new and undesirable behaviour.

Files Affected

Permission Mode

Accept Edits was ON (auto-accepting changes)

Can You Reproduce This?

Sometimes (intermittent)

Steps to Reproduce

_No response_

Claude Model

Opus

Relevant Conversation

Impact

High - Significant unwanted changes

Claude Code Version

2.1.283 (Claude Code)

Platform

Anthropic API

Additional Context

I haven't ran into this type of issue before today, so I suspect some change in the system prompt or something causes this behaviour. The most likely culprit, according to Claude, is the Agent tool description:

- `isolation: "worktree"` gives the agent its own git worktree (auto-cleaned if unchanged).
...
- `isolation` (enum: `worktree`, `remote`): Isolation mode. "worktree" creates a temporary git worktree so the agent works on an isolated copy of the repo. "remote" launches the agent in a remote cloud environment (always runs in background; availability is gated).

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗