Commit graph

2 commits

Author SHA1 Message Date
Eric Garcia
50318ab802 feat: RFC 0051 SessionStart hook for PATH injection
Added SessionStart hook that adds $CLAUDE_PROJECT_DIR/target/release
to PATH via CLAUDE_ENV_FILE. This makes `blue` available by name in
all subsequent hooks.

- .claude/hooks/session-start.sh: Sets PATH on session start
- .claude/hooks/guard-write.sh: Now uses `blue` instead of full path
- .claude/settings.json: Added SessionStart hook

Requires Claude Code restart to take effect.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 18:44:13 -05:00
Eric Garcia
fb869cf12d docs: RFC 0051 portable hook binary resolution
Problem: Claude Code hooks run in minimal environment without PATH.
Commands by name hang; only full paths work.

Solution: Use $CLAUDE_PROJECT_DIR for portable binary resolution:
  "$CLAUDE_PROJECT_DIR/target/release/blue" guard --path="$FILE_PATH"

This is documented Claude Code behavior - hooks don't inherit shell
initialization for security reasons.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 18:41:42 -05:00