Error
You ran git add on a file that doesn't exist.
Why this matters
This usually means a typo in the path, or the file was deleted or moved.
How to fix
Verify the file path:
ls -la path/to/file.goCheck for typos in the path
If the file was renamed, stage the new path:
git add new/path/to/file.goIf the file was deleted, stage the deletion:
git add -u # Stages all modifications and deletions
Hook output
When this error is triggered, klaudiush writes JSON to stdout:
permissionDecisionReason (shown to Claude):
[GIT009] File "path/to/file.go" does not exist. Verify the file exists before adding
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.
Related
- GIT003 - No files staged for commit