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
Account for env -C and env --chdir Before Resolving GIT_DIR in the Write Guard #3716
Raised by the review of promotion #3715 on the change #3709 made, as a P1 thread.
_launch in host-setup/agent-safety/claude/gh-write-guard.py strips env -C <dir> and env --chdir=<dir> from a command without changing the directory the command runs in. Requirement 4 then resolves a relative GIT_DIR, and the remote, from the caller's repository. Constructed shape:
env --chdir=/srv/other GIT_DIR=.git git push origin main
git runs in /srv/other and pushes that repository's origin, while the guard checks the working directory's. The fix is to carry the launcher's directory into the command model, or to read the shape as an undetermined repository, which blocks main, master and develop.
Claim released: feature/burndown-guard-env-chdir merged to develop as #3722 and its branch and worktree are cleaned up. Follow-ups: #3720, #3723. It joins promotion #3715, which closes this issue when it merges.
Activity
Read env's Directory and Environment Options in the Write Guard (#3722)
ptr727 commentedon Oct 31, 2026
Claim released:
feature/burndown-guard-env-chdirmerged todevelopas #3722 and its branch and worktree are cleaned up. Follow-ups: #3720, #3723. It joins promotion #3715, which closes this issue when it merges.