user_permanent approval for git push not persisting across sessions on Windows (v2.1.161–2.1.162)
Summary
git push (plain and with origin <branch>) continues to prompt for approval on subsequent sessions even after a user_permanent approval has been granted. This occurs on Windows only, in versions 2.1.161 and 2.1.162, despite Bash(git:*) being present in the enterprise permissions.allow list.
Environment
- OS: Windows 10 (builds 26100 and 26200)
- Claude Code versions affected: 2.1.161, 2.1.162
- Entrypoints: CLI and VS Code extension
- Terminal types:
windows-terminalandNULL(non-standard/undetected terminal) - macOS / Linux: Not affected — no occurrences observed in the same dataset
Steps to Reproduce
- On Windows 10, run Claude Code v2.1.161 or v2.1.162.
- Enterprise config includes
Bash(git:*)inpermissions.allow. - Issue
git pushorgit push origin <branch>from the CLI or VS Code extension. - When prompted, select "Yes, don't ask again" (
user_permanent). - End the session.
- Start a new session and run
git pushagain.
Observed Behavior
The approval prompt reappears in subsequent sessions. The user_permanent decision is not honored — neither across sessions nor (in some cases) within the same session after the initial grant.
Expected Behavior
- Because
Bash(git:*)is inpermissions.allow,git pushshould auto-approve without any prompt. - If for any reason the config allowlist is not applied, a
user_permanentgrant should suppress all future prompts for the same command pattern without requiring re-approval each session.
Evidence
- 9 occurrences across 3 distinct Windows machines over 5 days (June 3–8, 2026).
- A
user_permanentapproval was recorded on June 4; the same command prompted again on June 7 and June 8 — confirming the decision was not persisted across sessions. git status,git log, andgit diffon the same machines and same versions did not prompt — onlygit push.- No regression observed on macOS or Linux in the same fleet over the same period.
Hypothesis
git push may be subject to a special-case safety check for write/network operations that overrides both:
- The
permissions.allowconfig allowlist, and - Persisted
user_permanentdecisions.
The special-casing appears to be either Windows-specific or introduced/regressed in versions 2.1.161–2.1.162, since other git subcommands on the same machines do not exhibit this behavior.
Additional Notes
- The fact that
git status,git log, andgit diffpass through without prompting whilegit pushdoes not suggests the filtering may be keyed on whether the subcommand performs a write or network operation rather than the literalBash(git:*)glob. - May be related to the compound-command allowlist regression (see companion issue) if both share a Windows-specific permission evaluation code path.
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗