Heartbeat Work Item
Let a self-hosted executor heartbeat to renew its lease on a claimed work item.
/anthropic/v1/environments/{environment_id}/work/{work_id}/heartbeat○ UnsupportedRequest parameters
environment_idstring必填path: Environment ID (path or query parameter).
work_idstring必填path: Path parameter: the work item ID.
environment_idstring必填query: Environment ID (path or query parameter).
desired_ttl_secondsnumber可选query: Desired lease lifetime in seconds.
expected_last_heartbeatstring可选query: Expected last heartbeat, guarding against concurrent updates.
Returns
501 This endpoint is not implemented yet; calling it returns the response below:
This is the task-claiming protocol for self-hosted executors; platform agents always execute on the platform, and self-hosted executors are not supported. Calling it returns 501 (not_implemented_error), produces no side effects, and the official SDK does not retry.
Errors follow the Claude Managed Agents format — see error codes
Response
HTTP 200
Successful response
application/json
| Name | Type | Description |
|---|---|---|
| last_heartbeat | string | RFC 3339 timestamp of the actual heartbeat from DB |
| lease_extended | boolean | Whether the heartbeat succeeded in extending the lease |
| state | string | Current state of the work item (active/stopping/stopped) |
| ttl_seconds | number | Effective TTL applied to the lease |
| type | string | The type of response |