interrupt_on parameter.
Basic configuration
Theinterrupt_on parameter accepts a dictionary mapping tool names to interrupt configurations. Each tool can be configured with:
True: Enable interrupts with default behavior (approve, edit, reject allowed)False: Disable interrupts for this tool{"allowed_decisions": [...]}: Custom configuration with specific allowed decisions
Decision types
Theallowed_decisions list controls what actions a human can take when reviewing a tool call:
"approve": Execute the tool with the original arguments as proposed by the agent"edit": Modify the tool arguments before execution"reject": Skip executing this tool call entirely
Handle interrupts
When an interrupt is triggered, the agent pauses execution and returns control. Check for interrupts in the result and handle them accordingly.Multiple tool calls
When the agent calls multiple tools that require approval, all interrupts are batched together in a single interrupt. You must provide decisions for each one in order.Edit tool arguments
When"edit" is in the allowed decisions, you can modify the tool arguments before execution:
Subagent interrupts
When using subagents, you can use interrupts on tool calls and within tool calls.Interrupts on tool calls
Each subagent can have its owninterrupt_on configuration that overrides the main agent’s settings:
__interrupt__ and resume with Command.
Interrupts within tool calls
Subagent tools can callinterrupt() directly to pause execution and await approval:
Best practices
Always use a checkpointer
Human-in-the-loop requires a checkpointer to persist agent state between the interrupt and resume:Use the same thread ID
When resuming, you must use the same config with the samethread_id:
Match decision order to actions
The decisions list must match the order ofaction_requests:
Tailor configurations by risk
Configure different tools based on their risk level:Connect these docs to Claude, VSCode, and more via MCP for real-time answers.