{"version":"2.1.305","anchor":"hooks-hook-env-gets-a-call-before-spawn-and-a-no-arg-error","canonical_anchor":"hooks-hook-env-gets-a-call-before-spawn-and-a-no-arg-error","heading":"Hook commands get an extra preparation step before they start","tier":"internal","area":"Hooks","scope":"individual","heads_up":false,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.305\/e\/hooks-hook-env-gets-a-call-before-spawn-and-a-no-arg-error","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.305","markdown":"### Hook commands get an extra preparation step before they start\n\nClaude Code now prepares a hook's environment before starting it, and reports blocked hooks in diskless sessions as a proper error\n\n**Unclear.** It is not clear what the new preparation step changes in the environment a hook receives.\n\n**What**\n\nHooks are your own commands or scripts that Claude Code runs at set moments. Before starting a hook, Claude Code now runs an extra step on the hook's environment variables, the values passed to the command.\n\nIn a diskless session, which keeps nothing on disk, a command or script hook that got past the check meant to hold it back is not run. That case is now reported as a proper error rather than a bare message.\n\n**Why**\n\nThis is a small change with no stated effect on how hooks behave.\n\n- Area: Hooks\n- Tier: Under the hood\n- Useful: 1\/5\n- Signal: 2\/5\n- Scope: individual\n- Heads-up: no"}