Follow Discord
Sweep 27 Oct 2026 · 19:04Z Build v2.1.312 531 read Stable v2.1.308 Latest v2.1.312 Next v2.1.312 Feeds RSS JSON llms.txt llms-full.txt Unofficial
One change · api

self-hosted-sandboxes-workers changedmanaged-agents/self-hosted-sandboxes-workers

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

### Forward the work item’s secret ### Forward the work item's secret

The whole hunk

from line 421, old and new numbered
/
lines
from line 421
421421 </CodeGroupItem>
422422 </CodeGroup>
423423 
424 Because the handler claims work itself, it must [forward the work item's secret](https://platform.claude.com/docs/en/managed-agents/self-hosted-sandboxes-workers#forward-the-work-items-secret), as the `work_secret` (typescript: `workSecret`; go: `WorkSecret`) argument does here.
424 Because the handler claims work itself, it must [forward the work item’s secret](https://platform.claude.com/docs/en/managed-agents/self-hosted-sandboxes-workers#forward-the-work-items-secret), as the `work_secret` (typescript: `workSecret`; go: `WorkSecret`) argument does here.
425425 </Step>
426426</Steps>
427427 
from line 437
437437 
438438 ```dockerfile
439439 FROM your-base-image
440 ARG ANT_VERSION=2.3.0
440 ARG ANT_VERSION=2.4.0
441441 ARG TARGETARCH
442442 RUN ARCH=$([ "$TARGETARCH" = "arm64" ] && echo arm64 || echo amd64) && \
443443 curl -fsSL "https://github.com/anthropics/anthropic-cli/releases/download/v${ANT_VERSION}/ant_${ANT_VERSION}_linux_${ARCH}.tar.gz" \
from line 468
468468 
469469 The poller sets the `ANTHROPIC_*` variables that the script forwards, except the secret. See [Environment variables](https://platform.claude.com/docs/en/managed-agents/self-hosted-sandboxes-reference#environment-variables).
470470 
471 `/host/outputs` is a host directory you choose. Mounting it at `/workspace` lets you retrieve the session's deliverables after the sandbox exits. The mount also picks up the downloaded `skills/` tree and any intermediate files.
471 `/host/outputs` is a host directory you choose. Mounting it at `/workspace` lets you retrieve the session’s deliverables after the sandbox exits. The mount also picks up the downloaded `skills/` tree and any intermediate files.
472472 </Step>
473473 
474474 <Step title="Start the poller">
from line 478
478478 </Step>
479479</Steps>
480480 
481### Forward the work item's secret
481### Forward the work item’s secret
482482 
483483Each claimed work item can carry a per-session `secret` (csharp, go: `Secret`), which Anthropic issues. The worker that runs the session needs it to mount [memory stores](https://platform.claude.com/docs/en/managed-agents/self-hosted-sandboxes-memory).
484484 
from line 486
486486 
487487| You claim work with | The secret arrives as | Pass it to the worker as |
488488| -------------------------------------------------------------- | ------------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
489| `ant beta:worker poll --on-work` | The `secret` field of the work item JSON on your script's standard input | `ANTHROPIC_WORK_SECRET` in the sandbox's environment |
490| The SDK's `work.poller()` (go: `environments.NewWorkPoller()`) | The `secret` (go: `Secret`) field of each claimed work item | `ANTHROPIC_WORK_SECRET` in the sandbox's environment, or the `work_secret` (typescript: `workSecret`; go: `WorkSecret`) argument to `handle_item()` (typescript: `handleItem()`; go: `HandleItem()`) |
489| `ant beta:worker poll --on-work` | The `secret` field of the work item JSON on your script’s standard input | `ANTHROPIC_WORK_SECRET` in the sandbox’s environment |
490| The SDK’s `work.poller()` (go: `environments.NewWorkPoller()`) | The `secret` (go: `Secret`) field of each claimed work item | `ANTHROPIC_WORK_SECRET` in the sandbox’s environment, or the `work_secret` (typescript: `workSecret`; go: `WorkSecret`) argument to `handle_item()` (typescript: `handleItem()`; go: `HandleItem()`) |
491491 
492492Pass the secret only into the sandbox that serves that session, and never log it. See [Security model](https://platform.claude.com/docs/en/managed-agents/self-hosted-sandboxes-security) for how it relates to the environment key.
493493 
from line 797
797797 
798798## Stage files for a session
799799 
800Anthropic doesn't mount files or GitHub repositories into self-hosted sandboxes. To make session-specific files available:
800Anthropic doesn’t mount files or GitHub repositories into self-hosted sandboxes. To make session-specific files available:
801801 
8021. Pass file references, such as an S3 path or commit SHA, in the session's `metadata` field.
8021. 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.
8048043. Stage the files into the working directory before any tool runs.
805805 
Feedback