Skip to content

repo-hygiene: destructive-guard PreToolUse hook inert on Windows — bash resolves to WSL relay, fail-open #992

Description

@kyle-sexton

Problem

Every Bash call during a /repo-hygiene:clean session on Windows 11 emits:

PreToolUse:Bash hook error
Failed with non-blocking status code: <3>WSL (…Relay) ERROR: CreateProcessCommon:818: execvpe(/bin/bash) failed: No such file or directory

The frontmatter hook invokes bash, which resolves to the WSL relay (System32\bash.exe) instead of Git Bash. The failure is non-blocking, so the destructive-command guard advertised by SKILL.md (blocks rm -rf, git clean -f*, git reset --hard, recursive Remove-Item; CLEAN_GUARD_ACK=1 acknowledgement protocol) silently enforces nothing. 48 occurrences in one session — also a per-call latency/noise tax.

Evidence

Session fee18cc2 (2026-07-22), 82-repo fleet sweep: guard never blocked anything, including bulk rm -rf applies.

Fix direction

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: securitySecurity-relevant: vulnerability, hardening, or disclosure follow-up.priority: highSignificant impact, or blocks an imminent release; staff this cycle.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions