You'll noticeTier: how much it should matter to you
2Useful: my rating, 1 to 5
1Signal: worth watching, 1 to 5
SDKArea: what it touches
ImprovementsKind: in v2.1.319,
ImprovementsSection of the release
Unclear It is not stated whether the callback's answer at the "pre-ask" point can change the denial.
What
When 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.
Before, 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.
Why
This 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.