Skip to content

ToolApprovalDecision

ToolApprovalDecision = { scope?: ToolApprovalScope; type: "approve"; } | { message?: string; scope?: ToolRejectScope; type: "reject"; }

Defined in: _worktrees/docs-release/gaunt-sloth/packages/core/src/core/types.ts:412

A consumer-supplied decision on a PendingToolInterrupt: approve runs the tool, reject feeds the model a tool-rejected message (with the optional reason).

Each arm carries an optional scope; when absent it means once (backward compatible — a bare { type: 'approve' } or { type: 'reject' } still type-checks and behaves as the single-shot decision that persists nothing).

The two scopes are different types on purpose — see ToolRejectScope for why they stay apart now that they carry the same three values.