Files
claudetools/.claude/settings.json
Mike Swanson 8538ddf112 fix(hooks): locate check-messages.sh on any machine; never exit non-zero
The UserPromptSubmit hook only probed D:/claudetools and C:/claudetools, so
on machines where the repo lives elsewhere (e.g. BEAST at
C:/Users/guru/ClaudeTools) no candidate matched and the for-loop's final test
returned 1 — surfacing a hook error on every prompt AND skipping coord-message
delivery. Now try $CLAUDE_PROJECT_DIR and $HOME/ClaudeTools first (keep D:/C:
for other layouts) and end with `true` so a missing script is a no-op, not an
error.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-21 10:25:14 -07:00

23 lines
568 B
JSON

{
"permissions": {
"defaultMode": "bypassPermissions"
},
"preferences": {
"autoCompact": true,
"verbose": false
},
"hooks": {
"UserPromptSubmit": [
{
"hooks": [
{
"type": "command",
"command": "bash -c 'for p in \"$CLAUDE_PROJECT_DIR\" \"$HOME/ClaudeTools\" D:/claudetools C:/claudetools; do [ -n \"$p\" ] && [ -f \"$p/.claude/scripts/check-messages.sh\" ] && exec bash \"$p/.claude/scripts/check-messages.sh\"; done; true'",
"timeout": 15
}
]
}
]
}
}