Skip to main content
Permission policies control what happens when an Agent wants to call a tool. Built-in and MCP tool calls are evaluated as allow, ask, or deny; client-side custom tools always pause so your application can execute them and return the result.

Runtime behavior

When a tool call is projected into the event stream: evaluated_permission can be: Custom tools do not support permission_policy; they are executed by your client and resolved with user.custom_tool_result.

Configure policies on an agent

Configure built-in and MCP tool permissions inside the Agent tools array:
permission_policy.type values:

Pending action flow

When a tool call needs human or client input:
  1. The stream emits agent.tool_use or agent.custom_tool_use.
  2. The stream emits session.status_idle with stop_reason.type: "requires_action".
  3. stop_reason.event_ids lists the event IDs that need a response.
  4. Your client sends a response event to POST /api/v1/cloud/sessions/{session_id}/events.
  5. The Agent continues the same turn.
Pending actions do not automatically time out. They remain pending until your client resolves them or the session/turn is cancelled.

Confirm a tool call

Use the id of the agent.tool_use event as tool_use_id. This is an evt_... event ID, not the model provider’s internal tool-use ID.

Complete a custom tool

Custom tools are configured on the Agent with type: "custom"; see Agent Tools. When the Agent requests one, execute it in your application and respond with the agent.custom_tool_use event ID:
The content value can be a string, one text block, or an array of text blocks. The returned event is stored with content-block shape.

FAQ

Q: Can one turn require multiple responses? A: Yes. stop_reason.event_ids may contain multiple event IDs; respond to each pending tool request. Q: Do pending actions time out? A: No. They stay pending until resolved or until the session/turn is cancelled. Q: Can custom tools use permission_policy? A: No. Custom tools are client-side, so the client is responsible for executing or refusing them.

Next steps

Tools

Equip your agent with built-in, MCP, and custom tools.

Session event stream

Stream agent thinking, messages, and tool calls over SSE.

Start a session

Run an agent against an environment.

Agent setup

Review Agent configuration.