{"version":"2.1.301","anchor":"hook-env-set-denials-now-return-a-deny-result","canonical_anchor":"hook-env-set-denials-now-return-a-deny-result","heading":"Hook handlers for $.env.set now return a deny result","tier":"notice","area":"Hooks","scope":"individual","heads_up":true,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.301\/e\/hook-env-set-denials-now-return-a-deny-result","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.301","markdown":"### Hook handlers for `$.env.set` now return a deny result\n\nThe handler that warns about a `$.env.set` call now also returns a deny result instead of returning nothing\n\n**Unclear.** Whether the deny result now actually blocks a `$.env.set` call is not stated.\n\n**What**\n\nHooks 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:\n\n- The handler that logs a warning about a `$.env.set` call now also returns a deny result.\n\n- The other handler now returns an empty result after it applies the change.\n\nBefore this change, both only did their work and returned nothing.\n\n**Why**\n\nThis may change how `$.env.set` behaves in hook code.\n\n- Area: Hooks\n- Tier: You'll notice\n- Useful: 2\/5\n- Signal: 3\/5\n- Scope: individual\n- Heads-up: yes"}