Skip to main content

talonic_claim_decision_task

Take the exclusive lease on a decision task. A successful claim bumps execution_epoch, sets lease_expires_at, and returns everything needed to decide except the records themselves: the task metadata, the output_contract the decision must satisfy, the precedents reference block (resolved reviews on similar runs), and a package descriptor.

There is no separate fetch step in this protocol: claiming is the payload disclosure, and it is journaled onto the run. The claim is an exclusive lease with a default TTL of 120 seconds (configurable per app), clamped by the task's SLA deadline. A task whose lease lapsed can be reclaimed; the epoch moves on and the previous claimant's submit is rejected.

ParameterTypeDescription
task_id *UUIDTask ID from `talonic_list_decision_tasks` or the offered webhook.
Claim response
// talonic_claim_decision_task({ "task_id": "11111111-1111-4111-8111-111111111111" })
{
  "task": {
    "id": "11111111-1111-4111-8111-111111111111",
    "run_id": "22222222-2222-4222-8222-222222222222",
    "app_id": "aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa",
    "status": "claimed",
    "execution_epoch": 1,
    "lease_seconds": 120,
    "claimed_by": "kkkkkkkk-kkkk-4kkk-8kkk-kkkkkkkkkkkk",
    "lease_expires_at": "2026-09-22T10:02:00.000Z",
    "sla_deadline_at": "2026-09-22T10:10:00.000Z",
    "...": "remaining metadata as in the list"
  },
  "output_contract": {
    "type": "object",
    "required": ["approve"],
    "properties": {
      "approve": { "type": "boolean" },
      "hold_reason": { "type": "string" }
    }
  },
  "precedents": [],
  "package": {
    "package_kind": "records",
    "record_count": 3,
    "page_size": 500,
    "first_cursor": "eyJvZmZzZXQiOjB9",
    "documents": [
      {
        "document_id": "dddddddd-dddd-4ddd-8ddd-dddddddddddd",
        "filename": "invoice-4711.pdf",
        "mime_type": "application/pdf",
        "file_url": "/v1/documents/dddddddd-dddd-4ddd-8ddd-dddddddddddd/file"
      }
    ]
  }
}

output_contract arrives in the manifest's own convention: a plain contract is the bare JSON Schema the outcome validates against; a verdict_matrix or record_set contract is wrapped with its kind so the agent knows which envelope to submit. package.first_cursor is null when the package has no records. package_kind is mining_round for a rule-mining round driven from outside, whose package is one record holding the round's prompts and tool listing.

Save execution_epoch from the claim. Heartbeat, submit, release and fail all require it; a stale epoch is HTTP 409 and never enters the ledger.

Frequently asked questions

Can I inspect a decision task before claiming it?+
Only its metadata, through the list. The platform discloses the output contract, precedents and package only to the claimant, and journals that disclosure. Claim, read, and release it if it is not yours to decide.
What happens when two agents claim the same task?+
The second claim returns HTTP 409 while the first lease is live. Once the lease expires without a heartbeat, the task can be reclaimed; the epoch is bumped and any submit carrying the old epoch is rejected.