Skip to content

chore(hooks): cwd-safe ContextGuard hook command#67

Merged
ProtocolWarden merged 1 commit into
mainfrom
chore/harden-hook-path
Jun 16, 2026
Merged

chore(hooks): cwd-safe ContextGuard hook command#67
ProtocolWarden merged 1 commit into
mainfrom
chore/harden-hook-path

Conversation

@ProtocolWarden

Copy link
Copy Markdown
Owner

Hardened the ContextGuard hook command from relative bash .claude/hooks/pre_tool_use.sh to bash "${CLAUDE_PROJECT_DIR:-.}/.claude/hooks/pre_tool_use.sh" so it resolves regardless of the shell's cwd. The relative form produced a non-blocking No such file or directory whenever a tool ran from a non-root cwd. Part of a fleet-wide sweep; the canonical CL adapter template (source of truth) is hardened in a sibling PR.

🤖 Generated with Claude Code

Hardened the hook command to bash "${CLAUDE_PROJECT_DIR:-.}/.claude/hooks/..."
so it resolves regardless of the shell cwd. The relative form errored
non-blockingly from a non-root cwd.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@ProtocolWarden ProtocolWarden merged commit 04f4d34 into main Jun 16, 2026
5 checks passed
@ProtocolWarden ProtocolWarden deleted the chore/harden-hook-path branch June 16, 2026 03:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant