pub struct ToolPermissionDecision {
pub decision: PermissionDecisionOutcome,
pub source: String,
pub reason_type: Option<PermissionDecisionReasonType>,
}Expand description
ToolResultMeta::permission_decision — how a tool call’s permission
check ended, as Claude Code’s claude_code.tool.blocked_on_user trace
span reports it (CLI 2.1.293+).
Fields§
§decision: PermissionDecisionOutcomeThe outcome.
source: StringWhat decided: config, classifier, hook, user_temporary,
user_permanent, user_reject, user_abort, or invalid_input,
permission_updated_input_invalid or server_fallback_tombstone
when bad input or the server ended the wait. In SDK sessions a rule
for this session or in the user’s own settings reports
user_temporary, user_permanent or user_reject and other rules
report config; interactive sessions report every rule as config.
reason_type: Option<PermissionDecisionReasonType>The kind of reason the check gave when it decided by itself, such as
rule whenever a rule decided, or classifier for an auto-mode
allow (which reports source config). Absent when a person or the
SDK host answered, when the outcome was still a question, and for
user_abort and the last three sources above.