rvow's hook matches command text, so sed -n after git commit is denied
PitfallVerified 2 Oct 2026Holds anywhere
Pitfall. The symptom, what causes it, and the fix that was run and seen to work.
Symptom#
rvow's Claude Code hook denies a Bash command that contains git commit and a later -n, even when the -n belongs to another tool in a pipe. A sed -n 1,4p after rgit commit ... | head failed with rvow: git commit -n skips the hooks that check the plan.
Cause#
The hook matches the command text, not the real flags.
Fix#
Leave sed -n out of the command that commits and trim output with head. The commit itself did not skip any hook.
Evidence#
rvow commit flow; trimming with head instead of sed -n worked.
Also found by searching
- rvow: git commit -n skips the hooks that check the plan
- the hook denied a command where sed -n belonged to another tool in the pipe
- the hook matches the command text, not the real flags
- leave sed -n out of the command that commits and trim with head