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.277 ·

Cloud hook scripts now have their shebang line checked before running

Claude Code now reads a hook script's #! line to decide if its interpreter is safe to run in a cloud or remote session, not just its declared interpreter

TierYou'll noticehow much it should matter to you
Useful2my rating, 1 to 5
Signal2worth watching, 1 to 5
AreaSandboxwhat it touches
KindImprovementsin v2.1.277,
Group of 2 You'll notice

Claude Code now reads a hook script's #! line to decide if its interpreter is safe to run in a cloud or remote session, not just its declared interpreter

What

When deciding whether a hook script is safe to run in a cloud or remote ("teleported") session, Claude Code previously relied on a declared interpreter. Now, if no interpreter is declared, it reads the script's own shebang (#!) line and parses it with a new parser.

The parsed interpreter is classified as one of:

  • an absolute path
  • an env-resolved program (via /usr/bin/env-style invocation)
  • cwd-relative
  • "unjudgeable" — for example a relative interpreter, an env invocation with extra options, or an interpreter that itself takes a file argument

If the interpreter can't be confidently classified as safe (is "unjudgeable" or not a plain absolute path/known env-based form), Claude Code withholds the hook from running and shows a more detailed explanation of what interpreters and options are acceptable.

Why

A script's shebang line determines what actually runs it, so checking only a separately declared interpreter left room for a mismatched or unsafe interpreter to run unnoticed in cloud sessions. Parsing the shebang directly closes that gap.

See this entry in the whole of v2.1.277 →