{"version":"2.1.329","anchor":"clearer-error-when-permission-handlers-updatedinput-fails-s","canonical_anchor":"clearer-error-when-permission-handlers-updatedinput-fails-s","heading":"Hook defer is denied where it cannot resume, and rewritten tool input is checked","tier":"notice","area":"Permissions","scope":"individual","heads_up":true,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.329\/e\/clearer-error-when-permission-handlers-updatedinput-fails-s","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.329","markdown":"### Hook defer is denied where it cannot resume, and rewritten tool input is checked\n\nA PreToolUse hook's defer is now denied in headless sessions and script calls, and input rewritten by a permission handler is checked before it runs\n\n**What**\n\nA hook is your own script that runs at a set point. A `PreToolUse` hook runs before Claude uses a tool and can block it or defer it, meaning hold it for later.\n\n- Headless sessions: if a `PreToolUse` hook returns defer in a headless session (no one at the keyboard) or a remote-call session, the tool call is now denied with a message. Before, defer was not handled there.\n\n- Script calls: a new message says a `PreToolUse` hook deferred a call made from a script: \"A call from a script can't be resumed later, so it did not run.\"\n\n- Rewritten input: when a `canUseTool` callback, `PermissionRequest` hook or permission-prompt tool returns `updatedInput` (a changed version of what Claude asked the tool to do), it is now checked against the tool's input format before running. If it fails, an error says the model's original input was valid and \"This is a configuration issue in your canUseTool callback, PermissionRequest hook, or permission-prompt tool\".\n\n- A validation path for reading PDFs and other files was also reworked.\n\n**Why**\n\nAutomation that uses defer hooks without a person present now gets a clear denial instead of unclear behaviour. If you write SDK callbacks or hooks that rewrite tool input, a bad rewrite is now caught and pinned on your handler rather than on Claude.\n\n- Area: Permissions\n- Tier: You'll notice\n- Useful: 2\/5\n- Signal: 2\/5\n- Scope: individual\n- Heads-up: yes"}