self-hosted-sandboxes-workers changedmanaged-agents/self-hosted-sandboxes-workers
Nearest release: v2.1.307, published an hour 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+6added
Lines−6removed
From line
10
where the diff opens
First seen
2 Oct 2026
this site's first read of the page
Recorded edits18to this page, all time
The whole hunk
from line 10, old and new numbered
/
from line 10
1010 betaHeader: managed-agents-2026-04-01
1111---
1212
13The [quickstart](https://platform.claude.com/docs/en/managed-agents/self-hosted-sandboxes#quickstart) runs one `ant` CLI worker that polls continuously and runs every session in one process. This page covers the other ways to run a worker and how to choose between them.
13The [quickstart](https://platform.claude.com/docs/en/managed-agents/self-hosted-sandboxes#quickstart) runs one `ant` CLI worker that polls continuously and runs every session in one process. This page covers the other ways to run a worker and how to choose among them.
1414
1515## Choose a deployment pattern
1616
from line 161
161161 </Step>
162162
163163 <Step title="Export the webhook signing key">
164 Along with the environment ID and key from the [quickstart](https://platform.claude.com/docs/en/managed-agents/self-hosted-sandboxes#run-your-first-session), export the webhook signing key on your handler host. The handler uses it to verify incoming payloads.
164 Along with the environment ID and key from [Run your first session](https://platform.claude.com/docs/en/managed-agents/self-hosted-sandboxes#run-your-first-session), export the webhook signing key on your handler host. The handler uses it to verify incoming payloads.
165165
166166 ```bash
167167 export ANTHROPIC_WEBHOOK_SIGNING_KEY="whsec_..."
from line 169
169169 </Step>
170170
171171 <Step title="Implement the webhook handler">
172 Invoke the worker when `session.status_run_started` fires. The handler drains the queue and hands each claimed work item to `handle_item()` (typescript: `handleItem()`; go: `HandleItem()`), which downloads skills, executes tool calls, posts results back, and returns.
172 Start the worker when `session.status_run_started` fires. The handler drains the queue and hands each claimed work item to `handle_item()` (typescript: `handleItem()`; go: `HandleItem()`), which downloads skills, runs tool calls, posts results back, and returns.
173173
174174 <CodeGroup exclude="shell, csharp, java, php, ruby">
175175 <CodeGroupItem>
from line 429
429429
430430## Run one sandbox per session
431431
432A poller on the host claims work and calls your script once per work item. The script launches a sandbox for that one session.
432A poller on the host claims work and calls your script once for each work item. The script launches a sandbox for that one session.
433433
434434<Steps>
435435 <Step title="Build the sandbox image">
from line 493
493493
494494### Launch sandboxes from the SDK poller
495495
496To claim work from your own code instead of `ant beta:worker poll --on-work`, use `work.poller()` (go: `environments.NewWorkPoller()`). It polls the queue and gives you each claimed session, and you launch the sandbox:
496To claim work from your own code instead of `ant beta:worker poll --on-work`, use `work.poller()` (typescript: `new WorkPoller()`; go: `environments.NewWorkPoller()`). It polls the queue and gives you each claimed session, and you launch the sandbox:
497497
498498<CodeGroup exclude="shell, csharp, java, php, ruby">
499499 <CodeGroupItem language="cURL">
from line 801
801801
8028021. Pass file references, such as an S3 path or commit SHA, in the session's `metadata` field.
8038032. In your spawn script or `--on-work` handler, retrieve the session (`GET /v1/sessions/{session_id}`) and read `metadata`. The claimed work item carries the session ID but not the metadata.
8043. Stage the files into the working directory before tool execution begins.
8043. Stage the files into the working directory before any tool runs.
805805
806806<CodeGroup>
807807 ```bash cURL
No line in this hunk matches that.