Follow Discord
Sweep 20 Nov 2026 · 19:55Z Build v2.1.330 547 read Stable v2.1.323 Latest v2.1.330 Next v2.1.330 Feeds RSS JSON llms.txt llms-full.txt Unofficial
One change · api

events-and-streaming changedmanaged-agents/events-and-streaming

Nearest release: v2.1.323, published under an hour before this site recorded the change. Shown because the two are within 24 hours of each other. Nothing here says the release caused the edit.

Recorded here
Lines+8added
Lines−8removed
From line 683 where the diff opens
First seen 14 Aug 2026 this site's first read of the page
Recorded edits42to this page, all time

The whole hunk

from line 683, old and new numbered
/
lines
from line 683
6836833. For each blocking event ID, send a [`user.custom_tool_result`](https://platform.claude.com/docs/en/managed-agents/events-and-streaming#return-a-custom-tool-result) or a [`user.tool_confirmation`](https://platform.claude.com/docs/en/managed-agents/events-and-streaming#confirm-a-tool-call) event. A custom tool result doesn’t have to wait for step 2.
6846844. Once all blocking events are resolved, the session transitions back to `running`.
685685 
686In a multiagent session, a subagent’s blocking events are cross-posted to the primary thread. See [Tool permissions and custom tools](https://platform.claude.com/docs/en/managed-agents/session-threads#tool-permissions-and-custom-tools).
686In a multiagent session, the server cross-posts a subagent’s blocking events to the primary thread. See [Tool permissions and custom tools](https://platform.claude.com/docs/en/managed-agents/session-threads#tool-permissions-and-custom-tools).
687687 
688688### Return a custom tool result
689689 
690690The `agent.custom_tool_use` event contains the tool name and input. Run the tool in your system. Then send a `user.custom_tool_result` event, passing the event ID in the `custom_tool_use_id` (java: `customToolUseId`; php: `customToolUseID`; csharp, go: `CustomToolUseID`) parameter along with the result content.
691691 
692You can send the result as soon as the `agent.custom_tool_use` event arrives, without waiting for `session.status_idle`. The session still emits `session.status_idle` with a `requires_action` stop reason for the call, and your client can ignore it. A second result for the same call is accepted and has no effect.
692You can send the result as soon as the `agent.custom_tool_use` event arrives, without waiting for `session.status_idle`. The session still emits `session.status_idle` with a `requires_action` stop reason for the call, and your client can ignore it. The server accepts a second result for the same call, but that result has no effect.
693693 
694When you [reconnect](https://platform.claude.com/docs/en/managed-agents/events-and-streaming#reconnect-without-missing-events) to a paused session, `stop_reason.event_ids` on the latest `session.status_idle` event lists the calls to answer.
694When you [reconnect to a paused session](https://platform.claude.com/docs/en/managed-agents/events-and-streaming#reconnect-without-missing-events), `stop_reason.event_ids` on the latest `session.status_idle` event lists the calls to answer.
695695 
696696The following example answers each call as it arrives:
697697 
from line 1251
12511251 ```
12521252</CodeGroup>
12531253 
1254Conversation history is preserved unless the session is explicitly deleted. When a session goes idle, its sandbox is checkpointed. The checkpoint preserves the full sandbox state, including the filesystem, installed packages, and any files the agent created.
1254A session keeps its conversation history until you delete the session. When a session goes idle, Claude Managed Agents checkpoints its sandbox. The checkpoint preserves the full sandbox state, including the filesystem, installed packages, and any files the agent created.
12551255 
12561256<Note>
12571257 Sandbox state is preserved for only 30 days after the sandbox is created, and activity does not extend this window. After 30 days the sandbox state (files, installed tools, and so on) is unrecoverable, and a resumed session starts from a fresh sandbox. If your workflow depends on sandbox contents, have the agent write important artifacts to [outputs](https://platform.claude.com/docs/en/managed-agents/define-outcomes#retrieving-deliverables) before the window ends.
from line 1607
16071607 
16081608On a [supported model](https://platform.claude.com/docs/en/managed-agents/events-and-streaming#supported-models), send a `system.message` event to give the agent privileged system-level context. The context applies to the accompanying turn and all subsequent turns. Use it when the agent needs updated system-level guidance mid-session, for example a different persona, revised constraints, or context fetched at runtime.
16091609 
1610The event’s `content` (csharp, go: `Content`) accepts 1–1,000 text items. The content is appended to the session’s system context as a `role: "system"` turn. It doesn’t replace the top-level system prompt, which the `system` (csharp, go: `System`; ruby: `system_`) field on the agent definition sets.
1610The event’s `content` (csharp, go: `Content`) accepts 1–1,000 text items. The server appends the content to the session’s system context as a `role: "system"` turn. It doesn’t replace the top-level system prompt, which the `system` (csharp, go: `System`; ruby: `system_`) field on the agent definition sets.
16111611 
16121612<CodeGroup>
16131613 ```bash cURL
from line 1748
17481748 
17491749### Supported models
17501750 
1751`system.message` is supported by these models:
1751These models support `system.message`:
17521752 
17531753* Claude Fable 5.2
17541754* Claude Mythos 5.2
from line 1762
17621762* Claude Sonnet 5.5
17631763* Claude Haiku 5.5
17641764 
1765If the agent’s primary model does not support mid-conversation system injection, the event is rejected with a `model_does_not_support_mid_conversation_system` validation error. Subagent models are not checked, because `system.message` lands on the primary thread only.
1765If the agent’s primary model does not support mid-conversation system injection, the API rejects the event with a `model_does_not_support_mid_conversation_system` validation error. The API does not check subagent models, because `system.message` lands on the primary thread only.
17661766 
17671767### System messages while a tool call is pending
17681768 
Feedback