Follow Discord
Sweep 06 Nov 2026 · 01:32Z Build v2.1.319 537 read Stable v2.1.311 Latest v2.1.318 Next v2.1.319 Feeds RSS JSON llms.txt llms-full.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

Group of 2 You'll notice Improvements
JSON All of v2.1.277
You'll noticeTier: how much it should matter to you
2Useful: my rating, 1 to 5
2Signal: worth watching, 1 to 5
SandboxArea: what it touches
ImprovementsKind: in v2.1.277,
ImprovementsSection of the release

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 →

Feedback