Skip to content

bash-guard.py: the docs/*.md block exits 1, so Claude Code runs the command anyway #25

Closed

Description

@faizjamal0111-svg

bash-guard.py blocks git add of docs/*.md with sys.exit(1), but Claude Code treats exit 1 as a non-blocking error and runs the command ("If your hook is meant to enforce a policy, use exit 2", https://code.claude.com/docs/en/hooks).

The mainnet and transaction notes have the same problem from the other side: they print to stderr and exit 0, and per the same page "Claude never sees stderr from a hook that exits 0", so a pumpfun buy on mainnet goes ahead without Claude ever reading "costs real SOL".

Happy to send a PR. I build Paveo, an open-source test for agent guards: uvx paveo test runs a repo's hooks the way Claude Code calls them.

Activity

  1. smypmsa commented on Nov 9, 2026

    @smypmsa
    Member

    Thanks for the report. Fixed in #37.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions