Why a task lease expires
Status: Ready
Article ID: 051
Truth label: Current
Audience: Fleet operator
Reader outcome: Predict how Central handles an attempt whose worker stops renewing its lease.
Related articles: 004, 052, 057
Target week: 21
Last verified: 2026-09-13
Technical reviewer: Codex source audit
Editorial reviewer: Codex editorial audit
Lease one attempt
A claim creates a server-owned lease bound to task, worker, and fence. The worker renews it while the CLI runs. Heartbeat proves the process can reach Central; the lease proves it still owns this particular attempt.
Let expiry become evidence
Central's reaper checks expired leases and maximum wall-clock limits every fifteen seconds. If the same fence still owns an active task, Central records a failed run with “lease expired, worker presumed dead,” increments the fence, releases the worker, and removes the lease.
Apply retry policy after failure
An ordinary task retries only when it opted in and has budget. The retry stays pinned to the same worker. A pipeline failure beyond budget is held for a human instead of automatically cancelling the chain.
Diagnose one expiry
Inspect last renewal, TTL, worker logs, Central availability, run attempt, reaper ledger entry, retry count, and the checkout before restarting work. Separate a dead process from a network partition or verification overrun.
Current limits
Lease expiry protects control-plane ownership. It cannot roll back partial files or recover an unreported CLI session id. A retry can start fresh and can encounter a dirty checkout left by the expired attempt.
Next lesson
Continue with Fencing stale task attempts.
Derivative map
- Weekly package: WEEK-21
- Long video: VIDEO-W21-LONG
- Shorts: SHORT-W21-PROBLEM, SHORT-W21-MECHANISM, SHORT-W21-WARNING
- Email: EMAIL-W21
- LinkedIn: LI-W21-A, LI-W21-B
- X: X-W21-A, X-W21-B
- Visual: VISUAL-W21
Review record
- Lease creation, renewal, expiry, failure, retry, and pipeline hold checked against current source.
- Dirty-checkout and missing-session limits reviewed.
- Diagnostic separates liveness causes.
- Internal links and repository voice reviewed.
Review completed: 2026-08-27
Re-audited against the running product: 2026-09-13