Back to all errors

GIT009

GIT

File does not exist

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

  1. Verify the file path:

    ls -la path/to/file.go
  2. Check for typos in the path

  3. If the file was renamed, stage the new path:

    git add new/path/to/file.go
  4. If 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.

  • GIT003 - No files staged for commit

© 2026 Smykla Skalski Labs