From ce5f8518077c4476a5469c4c88ae728a102e8b58 Mon Sep 17 00:00:00 2001 From: ProtocolWarden <32967198+ProtocolWarden@users.noreply.github.com> Date: Mon, 15 Jun 2026 23:46:55 -0400 Subject: [PATCH] chore(hooks): cwd-safe ContextGuard hook command 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 --- .claude/settings.json | 4 ++-- .console/log.md | 6 ++++++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.claude/settings.json b/.claude/settings.json index 403a887..dffb9a6 100644 --- a/.claude/settings.json +++ b/.claude/settings.json @@ -6,7 +6,7 @@ "hooks": [ { "type": "command", - "command": "bash .claude/hooks/pre_tool_use.sh" + "command": "bash \"${CLAUDE_PROJECT_DIR:-.}/.claude/hooks/pre_tool_use.sh\"" } ] } @@ -16,7 +16,7 @@ "hooks": [ { "type": "command", - "command": "bash .claude/hooks/stop.sh" + "command": "bash \"${CLAUDE_PROJECT_DIR:-.}/.claude/hooks/stop.sh\"" } ] } diff --git a/.console/log.md b/.console/log.md index 167a20b..3a70abe 100644 --- a/.console/log.md +++ b/.console/log.md @@ -1,5 +1,11 @@ # Log +## 2026-06-15 — chore: cwd-safe ContextGuard hook command + +Hardened `.claude/settings.json` hook commands to +`bash "${CLAUDE_PROJECT_DIR:-.}/.claude/hooks/..."` so they resolve regardless of +the shell cwd (relative path errored non-blockingly from a non-root cwd). +Fleet-wide sweep; canonical CL adapter template hardened in a sibling PR. ## 2026-06-04 — Fix custodian-audit E701 findings (CI green) Expanded 11 single-line `if/elif X: stmt` compound statements in