Follow Discord
Sweep 10 Nov 2026 · 02:18Z Build v2.1.322 539 read Stable v2.1.311 Latest v2.1.322 Next v2.1.322 Feeds RSS JSON llms.txt llms-full.txt Unofficial
One change · api

Work changedapi/beta/environments/work

Nearest release: v2.1.322, published 2 hours 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+87added
Lines−1removed
From line 137 where the diff opens
First seen 14 Aug 2026 this site's first read of the page
Recorded edits21to this page, all time

### Beta Heartbeat Precondition Failed Error Details ### Beta Work Lease State

The whole hunk

from line 137, old and new numbered
/
lines
from line 137
137137 
138138 - `"webhooks-2026-10-07"`
139139 
140 - `"admin-user-sign-out-2026-10-08"`
141 
140142 - `"message-threads-2026-08-12"`
141143 
142144 - `"analytics-usage-cost-2026-08-24"`
from line 411
409411 
410412 - `"webhooks-2026-10-07"`
411413 
414 - `"admin-user-sign-out-2026-10-08"`
415 
412416 - `"message-threads-2026-08-12"`
413417 
414418 - `"analytics-usage-cost-2026-08-24"`
from line 671
667671 
668672 - `"webhooks-2026-10-07"`
669673 
674 - `"admin-user-sign-out-2026-10-08"`
675 
670676 - `"message-threads-2026-08-12"`
671677 
672678 - `"analytics-usage-cost-2026-08-24"`
from line 818
812818 
813819- `expected_last_heartbeat: optional string`
814820 
815 Expected last_heartbeat for conditional update (optimistic concurrency). Use literal 'NO_HEARTBEAT' to claim an unclaimed lease (first heartbeat). For subsequent heartbeats, echo the server's previous last_heartbeat value exactly. Returns 412 Precondition Failed if the actual value doesn't match.
821 Expected last_heartbeat for conditional update (optimistic concurrency). Use literal 'NO_HEARTBEAT' to claim an unclaimed lease (first heartbeat). For subsequent heartbeats, echo the server's previous last_heartbeat value exactly. Returns 412 Precondition Failed if the actual value doesn't match. The server does not compare the value when the work item is 'stopping' or 'stopped'.
816822 
817823### Headers
818824 
from line 938
932938 
933939 - `"webhooks-2026-10-07"`
934940 
941 - `"admin-user-sign-out-2026-10-08"`
942 
935943 - `"message-threads-2026-08-12"`
936944 
937945 - `"analytics-usage-cost-2026-08-24"`
from line 1138
11301138 
11311139 - `"webhooks-2026-10-07"`
11321140 
1141 - `"admin-user-sign-out-2026-10-08"`
1142 
11331143 - `"message-threads-2026-08-12"`
11341144 
11351145 - `"analytics-usage-cost-2026-08-24"`
from line 1420
14101420 
14111421 - `"webhooks-2026-10-07"`
14121422 
1423 - `"admin-user-sign-out-2026-10-08"`
1424 
14131425 - `"message-threads-2026-08-12"`
14141426 
14151427 - `"analytics-usage-cost-2026-08-24"`
from line 1685
16731685 
16741686 - `"webhooks-2026-10-07"`
16751687 
1688 - `"admin-user-sign-out-2026-10-08"`
1689 
16761690 - `"message-threads-2026-08-12"`
16771691 
16781692 - `"analytics-usage-cost-2026-08-24"`
from line 1955
19411955 
19421956 - `"webhooks-2026-10-07"`
19431957 
1958 - `"admin-user-sign-out-2026-10-08"`
1959 
19441960 - `"message-threads-2026-08-12"`
19451961 
19461962 - `"analytics-usage-cost-2026-08-24"`
from line 2022
20062022 
20072023## Domain types
20082024 
2025### Beta Heartbeat Precondition Failed Error Details
2026 
2027- `BetaHeartbeatPreconditionFailedErrorDetails object`
2028 
2029 `expected_last_heartbeat` does not match the stored heartbeat, so another worker may hold the lease.
2030 
2031 - `current_state: BetaWorkLeaseState`
2032 
2033 The lease as the server holds it.
2034 
2035 - `last_heartbeat: string or null`
2036 
2037 RFC 3339 timestamp of the stored heartbeat, or null if there has been none
2038 
2039 - `lease_extended: boolean`
2040 
2041 Always false: a refused heartbeat does not extend the lease
2042 
2043 - `state: "queued" or "starting" or "active" or 2 more`
2044 
2045 Current state of the work item
2046 
2047 - `"queued"`
2048 
2049 - `"starting"`
2050 
2051 - `"active"`
2052 
2053 - `"stopping"`
2054 
2055 - `"stopped"`
2056 
2057 - `ttl_seconds: number`
2058 
2059 TTL of the lease
2060 
2061 - `error_code: "heartbeat_precondition_failed"`
2062 
20092063### Beta Self Hosted Work
20102064 
20112065- `BetaSelfHostedWork object`
from line 2334
22802334 - `id: string`
22812335 
22822336 Session identifier (e.g., 'session_...')
2337 
2338### Beta Work Lease State
2339 
2340- `BetaWorkLeaseState object`
2341 
2342 A work item's lease as the server holds it.
2343 
2344 - `last_heartbeat: string or null`
2345 
2346 RFC 3339 timestamp of the stored heartbeat, or null if there has been none
2347 
2348 - `lease_extended: boolean`
2349 
2350 Always false: a refused heartbeat does not extend the lease
2351 
2352 - `state: "queued" or "starting" or "active" or 2 more`
2353 
2354 Current state of the work item
2355 
2356 - `"queued"`
2357 
2358 - `"starting"`
2359 
2360 - `"active"`
2361 
2362 - `"stopping"`
2363 
2364 - `"stopped"`
2365 
2366 - `ttl_seconds: number`
2367 
2368 TTL of the lease
22832369 
Feedback