Hook commands are now parsed to work out which script they run, without running them.
What's wrong with this entry?
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.
- 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).
unsupported_interpreter
Strings lifted out of the shipped bundle, so the claim above can be checked against them.
Related
Other releases about the same thing. Found by shared names or similar wording; neither means one caused the other.
-
v2.1.234
SessionEnd hooks lose the
bypass_permissions_disabledreasonBoth mention hook
-
v2.1.236
Hooks and Ctrl-C go quiet once shutdown has started
Both mention hook
-
v2.1.236
Shutdown seals transcript writes and gives SessionEnd hooks more time
Both mention hook