Poll for Work
Note: 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.
Long poll for work items in the queue.
Path parameters
Query parameters
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).
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).
Reclaim unacknowledged work items older than this many milliseconds. If omitted, uses the default (5000ms).
Reclaim unacknowledged work items older than this many milliseconds. If omitted, uses the default (5000ms).
Headers
Optional header to specify the beta version(s) you want to use.
To use multiple betas, use a comma separated list like beta1,beta2 or specify the header multiple times for each beta.
Optional header to specify the beta version(s) you want to use.
To use multiple betas, use a comma separated list like beta1,beta2 or specify the header multiple times for each beta.
The version of the Claude API you want to use.
Read more about versioning and our version history here.
The version of the Claude API you want to use.
Read more about versioning and our version history here.
Unique identifier for the specific worker polling, used to track aggregated environment-level work metrics in Console
Unique identifier for the specific worker polling, used to track aggregated environment-level work metrics in Console
Response
Successful Response