The whole hunk
from line 2162, old and new numbered
/
lines
from line 2162
21622162
21632163### Tool confirmation
21642164
2165When a [permission policy](https://platform.claude.com/docs/en/managed-agents/permission-policies) requires confirmation before a tool executes:
2165A tool call waits for your confirmation under an `always_ask` [permission policy](https://platform.claude.com/docs/en/managed-agents/permission-policies), or under `auto` when the server reaches no determination. When that happens:
21662166
216721671. The session emits an `agent.tool_use` or `agent.mcp_tool_use` event.
21682. The session pauses with a `session.status_idle` event containing `stop_reason: requires_action`. The blocking event IDs are in the `stop_reason.event_ids` array.
21682. 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.
216921693. Send a `user.tool_confirmation` event for each, passing the event ID in the `tool_use_id` parameter. Set `result` to `"allow"` or `"deny"`. Use `deny_message` to explain a denial.
217021704. Once all blocking events are resolved, the session transitions back to `running`.
21712171
2172Each `agent.tool_use` and `agent.mcp_tool_use` event carries `evaluated_permission` (`allow`, `ask`, or `deny`), and only events whose `evaluated_permission` is `"ask"` wait for a confirmation. Most events also carry an `evaluation` object that records which policy produced that outcome, described under [See how each call was evaluated](https://platform.claude.com/docs/en/managed-agents/permission-policies#see-how-each-call-was-evaluated). For example, a `bash` call paused under an `always_ask` policy appears on the stream as follows:
2173
2174```json
2175{
2176 "type": "agent.tool_use",
2177 "id": "sevt_01def...",
2178 "name": "bash",
2179 "input": {
2180 "command": "pip install -r requirements.txt"
2181 },
2182 "evaluated_permission": "ask",
2183 "evaluation": {
2184 "type": "always_ask"
2185 },
2186 "processed_at": "2026-03-25T14:01:45Z"
2187}
2188```
2189
21722190<CodeGroup>
21732191 ```bash cURL
21742192 exec {stream_fd}< <(curl --fail-with-body -sS -N \
from line 2802
27842802 * **Threads** lists every thread with its status, context size, and cost. Select a thread to view its details, such as the agent, model, context usage, and cost.
27852803
27862804Append `?event={event_id}` to a session URL to open the session at a specific event.
2805
2806With `ant beta:sessions connect`, you can open the same viewer from the `ant` CLI or follow the session in your terminal. See [Connect to a Managed Agents session from your terminal](https://platform.claude.com/docs/en/cli-sdks-libraries/cli/sessions-connect).
27872807
27882808## Debugging tips
27892809