Skip to main content

talonic_claim_agent_task

Claim a task before processing. A successful claim returns the full payload plus a new execution_epoch and lease_expires_at; both prevent two agents from writing results for the same task.

ParameterTypeDescription
task_id *UUIDAvailable task to claim, or an expired claim to reclaim.
A live claim held by another actor returns HTTP 409. Do not retry in a tight loop. Select another available task or wait until the lease expires.

Save the returned execution_epoch. Every heartbeat and submit must echo that exact epoch. Reclaiming an expired lease increments it, permanently invalidating work from the earlier claimant.

Frequently asked questions

What is an execution epoch?+
It is the claim generation. Each successful claim or reclaim receives a new integer; stale epochs are rejected so an expired worker cannot overwrite a newer worker's result.