{"version":"2.1.319","anchor":"pre-ask-deny-now-notifies-the-permission-callback","canonical_anchor":"pre-ask-deny-now-notifies-the-permission-callback","heading":"Permission denials found before a prompt now reach the SDK callback","tier":"notice","area":"SDK","scope":"individual","heads_up":false,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.319\/e\/pre-ask-deny-now-notifies-the-permission-callback","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.319","markdown":"### Permission denials found before a prompt now reach the SDK callback\n\nIf a tool would prompt but a later check denies it, Claude Code now calls canUseTool with decideLocation \"pre-ask\" and returns the denial\n\n**Unclear.** It is not stated whether the callback's answer at the \"pre-ask\" point can change the denial.\n\n**What**\n\nWhen Claude wants to use a tool, Claude Code decides whether to allow it, deny it or ask you. Programs built with the Agent SDK can supply a `canUseTool` callback, a function that gets a say in those decisions.\n\nBefore, once the first decision was \"ask\", Claude Code always went on to the prompt. Now, if a later decision is \"deny\", Claude Code calls `canUseTool` with `decideLocation: \"pre-ask\"` and then returns the denial.\n\n**Why**\n\nThis changes the order in which denials and prompts are settled. A callback that looks at `decideLocation` may now see the value `\"pre-ask\"` and should be ready for it.\n\n- Area: SDK\n- Names: `canUseTool`\n- Tier: You'll notice\n- Useful: 2\/5\n- Signal: 1\/5\n- Scope: individual\n- Heads-up: no"}