What you will be able to do
- Set always_allow, always_ask or auto on a Managed Agents toolset or on a single tool
- Predict the three outcomes of a call under the auto policy and read them from the event stream
- Answer a paused session with user.tool_confirmation events
1.Three policies and their defaults
In Managed Agents, a permission policy decides whether a server-executed tool runs on its own, waits for a person or is judged by the server one call at a time. Policies cover the pre-built agent toolset and MCP toolsets. Custom tools are not covered, because your application executes them, so any approval step for a custom tool is yours to build.
| Policy | Behaviour |
|---|---|
| always_allow | The tool executes automatically with no confirmation |
| always_ask | The session pauses and waits for your approval before executing |
| auto | The server evaluates each call and runs it, denies it, or pauses for your approval |
The MCP default is deliberate. Whoever runs an MCP server can add tools to it at any time, and the always_ask default means a newly added tool cannot run in your application until someone approves it. To trust a known server, set default_config.permission_policy on its mcp_toolset entry. No toolset uses auto by default.
To protect one dangerous tool, change that tool's policy and leave the rest of the toolset alone. The configs array overrides the toolset default per tool. In this agent the whole toolset runs freely, but every bash command waits for a person:
---
name: Coding Assistant
model: claude-opus-5-5
tools:
- type: agent_toolset_20260401
default_config:
permission_policy:
type: always_allow
configs:
- name: bash
permission_policy:
type: always_ask
---Policy changes do not reach sessions that are already running. Running sessions keep the toolset configuration they were created with, so tightening a policy protects only sessions created after the update. A policy also controls only when an enabled tool runs. To remove a tool from the agent completely, disable it.
Checkpoint 1 of 5· Fill the gap
This agent should let the whole agent toolset run on its own but make every bash command wait for a person to approve it. Which policy completes the bash override?
---
name: Coding Assistant
model: claude-opus-5-5
tools:
- type: agent_toolset_20260401
default_config:
permission_policy:
type: always_allow
configs:
- name: bash
permission_policy:
type: ?
---An entry in the configs array overrides the toolset default for one tool. Under always_ask the session pauses before every bash call until someone approves it. Under auto the server could run or deny a call without asking anyone, and always_allow would just repeat the default.
Source: platform.claude.comCheckpoint 2 of 5· Check yourself
A Managed Agent uses the agent toolset with default_config set to always_ask. It also has a custom refund_payment tool that your application executes. What happens when Claude calls refund_payment?
Permission policies cover only server-executed tools, meaning the agent toolset and MCP toolsets. Your application executes custom tools, so the always_ask setting has no effect on them. Any human check for refund_payment has to be built into your application.
“Custom tools are executed by your application and controlled by you, so they are not governed by permission policies.”Source: platform.claude.com
2.The auto policy: server-side judgement per call
Under auto, the server looks at the tool, the call's input and the session's content so far, so two calls to the same tool can get different answers. Each call ends one of three ways. It runs if the server judges it safe. It is denied if the server judges it high-risk: the agent gets an error tool result and the session continues. It pauses for your approval, just as under always_ask, if the server cannot decide.
A high-risk denial is final. Your client cannot override it, so auto lets the server refuse a call before any person gets to approve it. Every agent.tool_use and agent.mcp_tool_use event records the outcome in evaluated_permission. Under auto, the event's evaluation object also records the server's determination and, for ask or deny, a reason_code. Use that code for branching and for audit records, not as a message to show end users.
{
"type": "agent.tool_use",
"id": "sevt_01pqr...",
"name": "bash",
"input": {
"command": "rm -rf /workspace/reports"
},
"evaluated_permission": "deny",
"evaluation": {
"type": "auto",
"evaluated_permission": {
"type": "deny",
"reason_code": "high_risk"
}
},
"processed_at": "2026-03-25T14:05:12Z"
}The server decides partly by judging intent, and it takes intent from only one place. What you post in user.message events counts as your intent and can lead the server to allow a call it would otherwise deny. The server assesses tool results, fetched webpages, MCP responses and messages between threads, but it does not take instructions from them. That makes an injected instruction inside a webpage less dangerous. It also creates a gap: if your application relays an untrusted end user's text in user.message events, the server reads it as your intent. Put always_ask on any tool you would not let that end user run without review.
Checkpoint 3 of 5· Check yourself
Under auto, your client gets an agent.tool_use event for a bash call. The event has evaluated_permission "deny" and reason_code "high_risk". An operator looks at the command and thinks it is safe. What can they do about this call?
When auto denies a call as high-risk, the denial is final and the client cannot override it. Only calls that end in a pause for approval wait for a person. Policy changes also do not reach sessions that are already running.
“The session keeps running, and your client cannot override the denial.”Source: platform.claude.com
Checkpoint 4 of 5· Check yourself
A customer-support app passes customers' chat text straight into user.message events. The agent's toolset runs under auto. How should the team make sure a person still reviews bash calls?
The server treats whatever arrives in user.message as the operator's intent, and that intent can get a call allowed that would otherwise be denied. Relayed text from an untrusted end user therefore counts as intent too. To keep a person in the loop for a tool like bash, give it always_ask.
“Configure always_ask on the tools you would not let that end user run without review.”Source: platform.claude.com
3.Responding to a confirmation request
A call evaluates to ask in two cases: under always_ask, or under auto when the server cannot decide. Either way, the session stops and your client has to answer it. The round trip has four steps:
- The session emits an
agent.tool_useoragent.mcp_tool_useevent withevaluated_permissionset to ask. - The session emits
session.status_idlewithstop_reason.typeset torequires_action. The IDs of the blocking events are instop_reason.event_ids. - Your client sends one
user.tool_confirmationper blocking event, with the event ID intool_use_idandresultset to allow or deny. Adeny_messageexplains the refusal. Several confirmations can go in one events request. - Once every blocking event is resolved, the session runs again. Allowed tools execute. Denied tools return a rejection that includes your
deny_message, so the agent knows why it was refused.
{
"type": "agent.tool_use",
"id": "sevt_01def...",
"name": "bash",
"input": {
"command": "pip install -r requirements.txt"
},
"evaluated_permission": "ask",
"evaluation": {
"type": "always_ask"
},
"processed_at": "2026-03-25T14:01:45Z"
}A paused session waits indefinitely, so a confirmation nobody answers stalls the work silently. Subscribe to webhooks or watch the event stream so a person learns when a session needs them. For interactive use, ant beta:sessions connect shows the waiting call and sends the confirmation when you allow or deny it.
Confirmations work only on calls that are waiting. Sending user.tool_confirmation for an event whose evaluated_permission is not ask returns a 400 error. That includes calls the auto policy denied, which is how the API enforces that those denials cannot be overridden.
Checkpoint 5 of 5· Put it in order
Put the round trip for a bash call that pauses under always_ask in order, from the pause to the point where the agent continues.
- 1.Once every blocking event is resolved, the session runs again: an allowed call executes, and a denied call returns a rejection that includes the deny_message
- 2.The session emits an agent.tool_use event for the bash call with evaluated_permission set to ask
- 3.The session emits session.status_idle with stop_reason.type requires_action, and the blocking event IDs are in stop_reason.event_ids
- 4.Your client sends a user.tool_confirmation with that event ID in tool_use_id and result set to allow or deny, plus a deny_message if it refuses
The client can't answer until the session pauses with requires_action and lists the blocking event IDs, because each confirmation has to name one of those IDs. The session starts running again only after every blocking event has an answer, and a refused call then reaches the agent as a rejection that carries the deny_message.
“The session pauses with a session.status_idle event whose stop_reason.type is requires_action. The blocking event IDs are in the stop_reason.event_ids array.”Source: platform.claude.com
Sources
(4)
Every claim above is drawn from one of these pages, quoted as it was written on the date shown.
- 1.
“Custom tools are executed by your application and controlled by you, so they are not governed by permission policies.”
↩︎ Three policies and their defaults“This ensures that new tools added to an MCP server do not execute in your application without approval.”
↩︎ Three policies and their defaults“Running sessions keep the toolset configuration they were created with.”
↩︎ Three policies and their defaults“the server can treat two calls to the same tool differently”
↩︎ The auto policy: server-side judgement per call“The session keeps running, and your client cannot override the denial.”
↩︎ The auto policy: server-side judgement per call“What you post in user.message events counts as your intent”
↩︎ The auto policy: server-side judgement per call“Configure always_ask on the tools you would not let that end user run without review.”
↩︎ The auto policy: server-side judgement per call“A reason_code is a value for your client to branch on and keep in audit records, not text to display to end users.”
↩︎ The auto policy: server-side judgement per call“The session waits indefinitely for a response.”
↩︎ Responding to a confirmation request“Use deny_message to explain a denial.”
↩︎ Responding to a confirmation request“If you send a user.tool_confirmation for an event whose evaluated_permission is not ask, the API rejects it with a 400 error.”
↩︎ Responding to a confirmation request“If you send a user.tool_confirmation for an event whose evaluated_permission is not ask, the API rejects it with a 400 error.”
↩︎ Exam trap 1“Custom tools are executed by your application and controlled by you, so they are not governed by permission policies.”
↩︎ Exam trap 2“the agent toolset defaults to always_allow, and MCP toolsets default to always_ask.”
↩︎ Prediction“The session pauses with a session.status_idle event whose stop_reason.type is requires_action. The blocking event IDs are in the stop_reason.event_ids array.”
↩︎ Checkpoint - 2.https://code.claude.com/docs/en/permissionsOfficial docs
“Ask rules prompt for confirmation whenever Claude Code tries to use the specified tool.”
↩︎ Three policies and their defaults - 3.https://www.anthropic.com/engineering/claude-code-auto-modeSecondary source
“evaluates each action against a set of decision criteria before it executes, acting as a substitute for a human approver.”
↩︎ The auto policy: server-side judgement per call - 4.https://code.claude.com/docs/en/agent-sdk/user-inputOfficial docs
“Reject: block the tool and tell Claude why”
↩︎ Responding to a confirmation request