SDK clients now get an explicit system message when a tool call is denied instead of guessing.
What's wrong with this entry?
The control-protocol session can now push a system message to the SDK stream whenever a tool call is denied, so clients can react to denials instead of inferring them from the tool result.
- New
emitPermissionDeniedmethod on the control-protocol session class enqueues a message withtype: "system"andsubtype: "permission_denied". - Payload carries
tool_name,tool_use_id,agent_id,decision_reason_type, a serializeddecision_reason, the deny message, a uuid and the session id. - On the stdio
createCanUseToolpath it fires on any deny. - On the non-stdio path it fires only when a new helper confirms the
tool_useid actually appears in the message content and the abort signal has not fired.
decision_reason_type
Strings lifted out of the shipped bundle, so the claim above can be checked against them.
Related
Other releases about the same thing. Found by shared names or similar wording; neither means one caused the other.
-
v2.1.219
MCP allow/deny rules compare expanded env-var values
Both mention denied
-
v2.1.248
MCP server allow and deny lists get settings keys
Both mention denied
-
v2.1.219
MCP policy allow/deny entries now expand
${VAR}environment references, and unsafe URL expansions fail closedBoth mention denied