self-hosted-sandboxes-reference changedmanaged-agents/self-hosted-sandboxes-reference
Nearest release: v2.1.315, 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
39
where the diff opens
First seen
2 Oct 2026
this site's first read of the page
Recorded edits9to this page, all time
The whole hunk
from line 39, old and new numbered
/
from line 39
3939| `ant beta:worker poll` | Claims work items from the environment’s queue and runs each session in process. With `--on-work`, calls your script for each work item instead. |
4040| `ant beta:worker run` | Handles one claimed session and exits. Use it as the entrypoint of a per-session sandbox. |
4141
42| Flag | Description |
43| ------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
44| `--environment-id` | The environment to poll for work. Also reads from `ANTHROPIC_ENVIRONMENT_ID`. |
45| `--environment-key` | Authenticates the worker with this environment. Also reads from `ANTHROPIC_ENVIRONMENT_KEY`. |
46| `--workdir` | Directory where skills are downloaded and tools read and write files. Defaults to `.` (the current directory). |
47| `--on-work` | Script to call for each claimed work item instead of running tools in-process. Receives session details as environment variables and the work item as JSON on standard input. |
48| `--max-idle` | How long to wait after the session goes idle with an `end_turn` [stop reason](https://platform.claude.com/docs/en/build-with-claude/handling-stop-reasons) before shutting down. Defaults to `60s`. |
49| `--log-format` | Log output format. Use `json` for structured log ingestion. Defaults to `text`. |
42| Flag | Description |
43| ------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
44| `--environment-id` | The environment to poll for work. Also reads from `ANTHROPIC_ENVIRONMENT_ID`. |
45| `--environment-key` | Authenticates the worker with this environment. Also reads from `ANTHROPIC_ENVIRONMENT_KEY`. |
46| `--workdir` | Directory where skills are downloaded and tools read and write files. Defaults to `.` (the current directory). |
47| `--on-work` | Script to call for each claimed work item instead of running tools in-process. Receives session details as environment variables and the work item as JSON on standard input. |
48| `--max-idle` | How long the worker waits while a session is idle before `ant beta:worker run` exits or `ant beta:worker poll` moves on to the next work item. Idle time with a [`requires_action` stop reason](https://platform.claude.com/docs/en/managed-agents/events-and-streaming#respond-when-the-session-goes-idle) does not count. Defaults to `60s`. Set it to `0` to turn off the timeout. With an `--on-work` script, `ant beta:worker poll` ignores this flag. Pass it instead to the `ant beta:worker run` command that your script starts. |
49| `--log-format` | Log output format. Use `json` for structured log ingestion. Defaults to `text`. |
5050
5151## Environment variables
5252
No line in this hunk matches that.