[Bug] CLAUDE_CODE_DISABLE_GIT_INSTRUCTIONS=1 has no effect on git subprocess polling on Windows

Status Open
Reported on v2.1.296
Maintainer reply None cached
Activity 0 comments · opened Oct 10, 2026

Bug Description
CLAUDE_CODE_DISABLE_GIT_INSTRUCTIONS=1 does not reduce git subprocess polling in interactive sessions (Windows 11, claude.exe from ~\.local\bin). Two interactive sessions in the same repo (a large monorepo), same scripted load (20 Read/Grep calls looped for 600 s, no Bash, no agents). One started with the variable set to 1 (verified via os.environ inside the session), one unset. Direct git.exe children of each claude.exe over 600 s: unset 1,163; set 1,164. Direct conhost.exe children: 773 vs 766. Commonest subcommands across the sample: status, remote, rev-parse, config, symbolic-ref, update-index, write-tree, often at ~0.1 s spacing. Expected: setting the variable stops the background git calls. Actual: no change. Is there a setting that disables the git status/branch polling, or is it unconditional?

Environment Info

  • Platform: win32
  • Terminal: windows-terminal
  • Version: 2.1.296
  • Feedback ID: e189b804-f497-4639-a4ce-ba5861877bda

View original on GitHub ↗