Follow Discord
Sweep 24 Nov 2026 · 22:58Z Build v2.1.332 549 read Stable v2.1.325 Latest v2.1.331 Next v2.1.332 Feeds RSS JSON llms.txt llms-full.txt Unofficial
One change · api

self-hosted-sandboxes-custom-tools changedmanaged-agents/self-hosted-sandboxes-custom-tools

Nearest release: v2.1.332, published 6 hours after 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+3added
Lines−3removed
From line 40 where the diff opens
First seen 2 Oct 2026 this site's first read of the page
Recorded edits22to this page, all time

The whole hunk

from line 40, old and new numbered
/
lines
from line 40
4040 
4141The environment key authorizes posting custom tool results, so your Claude API key stays off the worker host.
4242 
43<Note>
44 To serve custom tools, you need the SDK worker. The `ant` CLI worker has no way to register a custom tool implementation. In the sandbox-per-session pattern, [run the SDK worker inside the sandbox](https://platform.claude.com/docs/en/managed-agents/self-hosted-sandboxes-per-session#run-the-sdk-worker-inside-the-sandbox).
45</Note>
43To serve custom tools from a prebuilt worker, you need the SDK worker. The `ant` CLI worker has no way to register a custom tool implementation. In the sandbox-per-session pattern, [run the SDK worker inside the sandbox](https://platform.claude.com/docs/en/managed-agents/self-hosted-sandboxes-per-session#run-the-sdk-worker-inside-the-sandbox).
4644 
4745## Serve a custom tool
4846 
from line 222
224222</Steps>
225223 
226224The worker answers only the tools registered with it. If you declare a tool on the agent but no worker or client serves it, the session pauses with a `requires_action` stop reason. It stays paused until something posts the result. See [Answer tool calls that pause the session](https://platform.claude.com/docs/en/managed-agents/events-and-streaming#answer-tool-calls-that-pause-the-session) for the event flow.
225 
226On Claude Models on Google Cloud (Anthropic managed), you [write your own worker](https://platform.claude.com/docs/en/managed-agents/self-hosted-sandboxes#worker-authentication-on-cloud-platforms), which uses Google Cloud credentials instead of the environment key. Have it send each custom tool’s result as a `user.custom_tool_result` event, as [Return a custom tool result](https://platform.claude.com/docs/en/managed-agents/events-and-streaming#return-a-custom-tool-result) describes.
227227 
228228## Wrap an MCP server as custom tools
229229 
Feedback