{"version":"2.1.242","anchor":"hook-commands-are-parsed-to-find-the-script-behind-them","canonical_anchor":"hook-commands-are-parsed-to-find-the-script-behind-them","heading":"Hook commands are parsed to find the script behind them","tier":"internal","area":"Hooks","scope":null,"heads_up":null,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.242\/e\/hook-commands-are-parsed-to-find-the-script-behind-them","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.242","markdown":"### Hook commands are parsed to find the script behind them\n\nHook commands are now parsed to work out which script they run, without running them.\n\n**What**\n\nA 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.\n\n**Details**\n\n- Handles quoting, `$HOME` and `${CLAUDE_PROJECT_DIR}` prefixes, interpreter names such as python, bash, node, deno and bun, and `uv run`.\n- 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_prefix` or `unsupported_platform`.\n- Refuses paths inside Claude Code's own bookkeeping directories (`shell-snapshots`, `session-env`, `projects`, `file-history`, `backups`).\n- Reading a candidate script rejects anything that is not a regular file, is hard-linked (`multiply_linked`), or is oversized (`too_large`).\n\n**Evidence**\n\n`unsupported_interpreter`\n\n- Area: Hooks\n- Tier: Under the hood\n- Useful: 2\/5\n- Signal: 4\/5"}