Problem
When hooks reference binaries that aren't on PATH, they fail silently on every event. The user gets no feedback — just mysterious slowness as "command not found" errors are swallowed or cause retries.
From the incident: 7 hooks called hookwise dispatch but the binary wasn't on PATH. Each silently failed on every matching event, compounding the slowness with no visible errors.
Requirements
F1.3 — Binary Existence Check
For each hook in Claude Code settings, extract the executable name and verify it exists on PATH using exec.LookPath:
FAIL hook-binary: "hookwise" not found on PATH (used by 7 hooks)
→ These hooks will fail silently on every event.
→ Fix: ensure hookwise is installed and on PATH, or remove these hooks.
PASS hook-binary: "custom-lint.sh" found at ./scripts/custom-lint.sh
Implementation Notes
- Read hooks from
~/.claude/settings.json and ~/.claude/projects/*/settings.local.json
- Extract first token of each hook command as the binary name
- Use
exec.LookPath for PATH resolution
- For relative paths (e.g.,
./scripts/foo.sh), check existence from project directory
- Report per-binary, not per-hook (group hooks that use the same binary)
Acceptance Criteria
Context
This is P0 — catches the #1 silent failure mode from the incident.
📎 Design doc: docs/plans/2026-03-07-hook-safety-and-onboarding-design.md (Feature 1.3)
Problem
When hooks reference binaries that aren't on PATH, they fail silently on every event. The user gets no feedback — just mysterious slowness as "command not found" errors are swallowed or cause retries.
From the incident: 7 hooks called
hookwise dispatchbut the binary wasn't on PATH. Each silently failed on every matching event, compounding the slowness with no visible errors.Requirements
F1.3 — Binary Existence Check
For each hook in Claude Code settings, extract the executable name and verify it exists on PATH using
exec.LookPath:Implementation Notes
~/.claude/settings.jsonand~/.claude/projects/*/settings.local.jsonexec.LookPathfor PATH resolution./scripts/foo.sh), check existence from project directoryAcceptance Criteria
exec.LookPathFAILoutput with count of affected hooksPASSoutput with resolved path&&)Context
This is P0 — catches the #1 silent failure mode from the incident.
📎 Design doc:
docs/plans/2026-03-07-hook-safety-and-onboarding-design.md(Feature 1.3)