What
A new parser reads a hook's shell command and works out whether it ultimately runs an identifiable script file, which lets Claude Code reason about a hook without executing it.
Details
- Handles quoting,
$HOMEand${CLAUDE_PROJECT_DIR}prefixes, interpreter names such as python, bash, node, deno and bun, anduv run. - Returns either the interpreter and resolved script path, or a reason it gave up:
shell_syntax,unsupported_interpreter,uv_project,args_form,no_path,shell_prefixorunsupported_platform. - Refuses paths inside Claude Code's own bookkeeping directories (
shell-snapshots,session-env,projects,file-history,backups). - Reading a candidate script rejects anything that is not a regular file, is hard-linked (
multiply_linked), or is oversized (too_large).
Evidence
unsupported_interpreter
Strings lifted out of the shipped bundle, so the claim above can be checked against them.