Follow Discord
Sweep 22 Oct 2026 · 04:32Z Build v2.1.308 527 read Stable v2.1.308 Latest v2.1.308 Next v2.1.308 Feeds RSS JSON llms.txt llms-full.txt Unofficial

Claude Code v2.1.301 ·

Hook handlers for $.env.set now return a deny result

The handler that warns about a $.env.set call now also returns a deny result instead of returning nothing

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

Unclear Whether the deny result now actually blocks a $.env.set call is not stated.

What

Hooks are scripts or functions that run automatically at set points while Claude Code works. Code in a hook can call $.env.set to change environment variables, which are named settings passed to programs. Two of the handlers involved in this have changed:

  • The handler that logs a warning about a $.env.set call now also returns a deny result.
  • The other handler now returns an empty result after it applies the change.

Before this change, both only did their work and returned nothing.

Why

This may change how $.env.set behaves in hook code.

How sure we are
Something disagreesSomething we can check disagrees with this entry, or the writer said they could not settle it.
The writer flagged doubtWhether the deny result now actually blocks a `$.env.set` call is not stated.
Anthropic's release notes agreeChanged a mod's $.env.set to resolve with {} once the variable is set or unset, or with { deny } saying why when the write is not made

See this entry in the whole of v2.1.301 →

Feedback