Interrupts, identifying the calls waiting for approval or input. Persist conversation history so the next invocation can recover those pending calls.
Require approval
For a typed function tool, passhastekit.WithNeedsApproval(true). For a custom tool, set BaseTool.RequiresApproval. For MCP tools, use mcpclient.WithApprovalRequiredTools.
The agent asks for approval before executing the action. Unrelated calls that do not require approval may already have completed. Rejecting a pending call does not undo those actions.
Resume from Go
This function resumes every interrupt inpaused with an approval. In an application, build the resolutions from actual user decisions rather than approving automatically:
InterruptActionReject for rejection. For forms, include the submitted values in InterruptResolution.Content, following the interrupt’s schema. Match the exact call ID and the original namespace/thread. Inspect the resumed result again: it can pause for another decision.
Custom interruptions
A custom tool can return an interruption and serializedStateUpdates describing how to continue. On re-entry, inspect ToolCall.ShouldResume, State, and ResumeMessages. Do not repeat the already-completed side effect when processing a resolution.
Agent-as-tool, MCP elicitation, and workflow-as-tool integrations use this continuation mechanism. workflow.Pause belongs to workflow nodes; it is not the return protocol for a general agent tool.