Sweep 19 Sep 2026 · 02:36Z Build v2.1.278 500 read Stable v2.1.267 Latest v2.1.278 Next v2.1.278 Feeds RSS JSON llms.txt Unofficial
Claude Code v2.1.275 ·

Hook-command relative-script risk detection greatly expanded

Claude Code now detects many more ways a hook script could break if run from a different folder

TierYou'll noticehow much it should matter to you
Useful2my rating, 1 to 5
Signal1worth watching, 1 to 5
AreaHookswhat it touches
KindImprovementsin v2.1.275,
You'll notice

Claude Code now detects many more ways a hook script could break if run from a different folder

What

Claude 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:

  • it now strips hidden NUL bytes before decoding the script
  • it recognizes more shells: ash, ksh, mksh, rbash, and fish
  • it separates the shebang line (the #!/bin/... line that names the shell) from the rest of the script for more accurate analysis
  • it adds a check specific to the csh shell for set path = (...) lines that contain relative or . (current directory) entries
  • it detects relative file includes pulled in via make include or awk @include
Why

Hooks 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.

See this entry in the whole of v2.1.275 →