{"version":"2.1.275","anchor":"hook-command-relative-script-risk-detection-greatly-expanded","canonical_anchor":"hook-command-relative-script-risk-detection-greatly-expanded","heading":"Hook-command relative-script risk detection greatly expanded","tier":"notice","area":"Hooks","scope":null,"heads_up":null,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.275\/e\/hook-command-relative-script-risk-detection-greatly-expanded","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.275","markdown":"### Hook-command relative-script risk detection greatly expanded\n\nClaude Code now detects many more ways a hook script could break if run from a different folder\n\n**What**\n\nClaude Code can warn when a hook (a shell command that runs automatically at certain points, configured via plugins or settings) implicitly depends on the folder it's launched from, which can make it fail when run elsewhere. This detection was substantially expanded:\n\n- it now strips hidden NUL bytes before decoding the script\n\n- it recognizes more shells: `ash`, `ksh`, `mksh`, `rbash`, and `fish`\n\n- it separates the shebang line (the `#!\/bin\/...` line that names the shell) from the rest of the script for more accurate analysis\n\n- it adds a check specific to the `csh` shell for `set path = (...)` lines that contain relative or `.` (current directory) entries\n\n- it detects relative file includes pulled in via `make include` or `awk @include`\n\n**Why**\n\nHooks that quietly rely on the current working directory can fail unpredictably when Claude Code runs them from a different location. Catching more of these cases means more accurate warnings before a hook silently breaks.\n\n- Area: Hooks\n- Tier: You'll notice\n- Useful: 2\/5\n- Signal: 1\/5"}