Skip to content

Commit cfdf285

Browse files
randclaude
andcommitted
fix(hooks): silence stderr in fail-open dispatch path
Claude Code surfaces stderr as "hook error" even with exit 0. Remove the stderr message when binary is not found to eliminate the error display while still failing open with {"decision":"approve"}. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 4472220 commit cfdf285

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

scripts/hook-dispatch.sh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,6 @@ if [ -f "$LEGACY_SCRIPT" ]; then
9696
exec python3 "$LEGACY_SCRIPT"
9797
fi
9898

99-
# Nothing found - fail open to avoid blocking
100-
echo "Hook not found: $HOOK_NAME" >&2
99+
# Nothing found - fail open silently to avoid hook error display
101100
echo '{"decision":"approve"}'
102101
exit 0

0 commit comments

Comments
 (0)