Error
Commit message contains a pull request reference (e.g., #123 or PR #456).
Why this matters
- PR numbers should be in the PR body, not commit messages
- Commit messages are permanent; PR numbers are repository-specific
- References in commits become meaningless when rebased to other repos
How to fix
Remove PR references from commit messages:
# Wrong:
git commit -sS -m "fix(api): resolve timeout issue (#123)"
# Correct:
git commit -sS -m "fix(api): resolve timeout issue"
Add PR references to the pull request description instead, where GitHub will automatically link them.
Configuration
Disable this check in config.toml:
[validators.git.commit.message]
block_pr_references = false
Hook output
When this error is triggered, klaudiush writes JSON to stdout:
permissionDecisionReason (shown to Claude):
[GIT011] Commit message contains a PR reference (#123). Remove PR reference from commit message (use in PR body instead)
systemMessage (shown to user): Formatted error with fix hint and reference URL.
additionalContext (behavioral guidance):
Automated klaudiush validation check. Fix the reported errors and retry the same command.