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

Poll for Work changedapi/beta/environments/work/poll

Nearest release: v2.1.245, 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+19added
Lines−22removed
From line 1 where the diff opens
First seen 14 Aug 2026 this site's first read of the page
Recorded edits16to this page, all time

# Poll for Work ## Path parameters ## Query parameters ## Headers ## Returns ## Example ### Response (200) ## Poll for Work ### Path Parameters ### Query Parameters ### Header Parameters ### Returns ### Example #### Response

The whole hunk

from line 1, old and new numbered
/
lines
from line 1
1---
2title: Poll for Work
3url: https://platform.claude.com/docs/en/api/beta/environments/work/poll
4---
1# Poll for Work
52 
6## Poll for Work
3**GET** `/v1/environments/{environment_id}/work/poll`
74 
8**get** `/v1/environments/{environment_id}/work/poll`
9 
105Note: these endpoints are called automatically by the pre-built environment worker provided in the SDKs and CLI, for orchestrating sessions with self-hosted sandbox environments. They are included here as a reference; you do not need to invoke them directly.
116 
127Long poll for work items in the queue.
138 
14### Path Parameters
9## Path parameters
1510 
1611- `environment_id: string`
1712 
18### Query Parameters
13## Query parameters
1914 
2015- `block_ms: optional number`
2116 
2217 How long to wait for work to arrive before returning. Must be 1-999 in milliseconds. Defaults to non-blocking (returns immediately if no work is available).
2318 
19 minimum: 1
20 
2421- `reclaim_older_than_ms: optional number`
2522 
2623 Reclaim unacknowledged work items older than this many milliseconds. If omitted, uses the default (5000ms).
2724 
28### Header Parameters
25 minimum: 1
2926 
27## Headers
28 
3029- `"anthropic-beta": optional array of AnthropicBeta`
3130 
3231 Optional header to specify the beta version(s) you want to use.
from line 106
107106 
108107 Unique identifier for the specific worker polling, used to track aggregated environment-level work metrics in Console
109108 
110### Returns
109## Returns
111110 
112- `BetaSelfHostedWork object { id, acknowledged_at, created_at, 10 more }`
111- `BetaSelfHostedWork object`
113112 
114113 Work resource representing a unit of work in a self-hosted environment.
115114 
from line 140
141140 
142141 Type of work data
143142 
144 - `"session"`
145 
146143 - `environment_id: string`
147144 
148145 Environment identifier this work belongs to (e.g., `env_...`)
from line 186
189186 
190187 The type of object (always 'work')
191188 
192 - `"work"`
189 default: work
193190 
194### Example
191## Example
195192 
196```http
193```bash
197194curl https://api.anthropic.com/v1/environments/$ENVIRONMENT_ID/work/poll \
198195 -H 'anthropic-version: 2023-06-01' \
199196 -H 'anthropic-beta: managed-agents-2026-04-01' \
from line 197
200197 -H "X-Api-Key: $ANTHROPIC_API_KEY"
201198```
202199 
203#### Response
200### Response (200)
204201 
205202```json
206203{
Feedback