Error
One or more body lines exceed the maximum length.
Why this matters
- Git tools wrap or truncate long lines, breaking formatting
- 72 characters is the widely adopted standard for readable git logs
How to fix
Wrap body lines at 72 characters (default):
git commit -sS -m "feat(api): add authentication
This commit adds OAuth2-based authentication to the API.
Users can now authenticate using their Google or GitHub
accounts, with JWT tokens for session management.
Changes:
- Added OAuth2 provider configuration
- Implemented JWT token generation
- Added middleware for route protection"
Configuration
Adjust the maximum body line length in config.toml:
[validators.git.commit.message]
body_max_line_length = 100 # Default: 72
body_line_tolerance = 5 # Additional tolerance (default: 5)
With defaults, lines up to 77 characters pass before triggering a failure.
Exceptions
These lines are exempt from length limits:
- URLs (lines starting with
http://orhttps://) - Code blocks (indented with 4+ spaces)
- Trailers (like
Signed-off-by:)
Hook output
When this error is triggered, klaudiush writes JSON to stdout:
permissionDecisionReason (shown to Claude):
[GIT005] Commit message body line exceeds 72 characters. Wrap body lines at 72 characters
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.