You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Read Persisted Config a Command Writes Before an Alias or Commit in the Write Guard #3303
A Command Earlier in the Same Call Can Write the Persisted Config the Guard Reads
host-setup/agent-safety/claude/gh-write-guard.py reads persisted git config before the command runs. That change taught the push reads to treat a git config or git remote earlier in the same call as rewriting the remote config. The two alias walks and the hooks-path read do not do the same, so a persisted value the command writes first is never read.
Constructed cases, each allowed:
git config alias.p push && git p origin develop pushes to develop.
git config alias.rh 'reset --hard' && git rh, run in a primary checkout, hard-resets it.
git config core.hooksPath /dev/null && git commit -m x skips the commit hooks. A standalone git config core.hooksPath /dev/null also persists the bypass for later commands.
Possible Direction
Where a git config that does not only read runs before an alias-shaped subcommand in the same command, read the persisted alias as unresolved in both walks. _config_may_change already says which commands count. A persisted core.hooksPath write is a hook bypass of its own and may want the same treatment as the -c override.
Closed as out of the write guard's scope under the maintainer's decision (ptr727, 2026-10-23) on #3391, item 1. The guard bounds a good-faith agent's mistake rather than an adversary, so a parse gap reached only by a command shape no agent plausibly types in a coding session is closed rather than fixed, and the guard's own growth is a cost each later review pays again. The scope statement lands in the guard's docstring and README under #3391. Reopen only with a command a session actually produced.
Activity
Read Config and Alias Rewrites the Write Guard Missed (#3306)
ptr727 commentedon Oct 23, 2026
Closed as out of the write guard's scope under the maintainer's decision (ptr727, 2026-10-23) on #3391, item 1. The guard bounds a good-faith agent's mistake rather than an adversary, so a parse gap reached only by a command shape no agent plausibly types in a coding session is closed rather than fixed, and the guard's own growth is a cost each later review pays again. The scope statement lands in the guard's docstring and README under #3391. Reopen only with a command a session actually produced.