tasks_claim
Claim a task atomically for your session, starting work with a lease that automatically expires. Receive explicit reasons if the task is blocked, already claimed, or closed.
Instructions
Atomically claim a task for the current session, moving it to in_progress with a lease. A refused claim names its cause: held by another live claim ('task already claimed'), waiting on unfinished dependencies ('task blocked', naming the blockers -- finish those first), or already done/dropped ('task closed'). Re-claiming a task you already hold refreshes (heartbeats) the lease; a task whose lease has expired can be reclaimed. Release it with tasks_release or by closing it (tasks_update done/dropped); session_end releases all of a session's claims.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | task id to claim | |
| session | No | the acting agent's session: the cc/<id> or cx/<id> on your briefing's 'Seam session' line, or a session name. Defaults to the connection's bound session, then a sole active ambient. Pass it whenever you have not run session_start and several agents are active -- the bare call is then ambiguous and fails rather than guesses. | |
| session_id | No | the acting agent's session ULID; takes precedence over session and the bound session | |
| lease_seconds | No | lease duration in seconds before the claim lapses and the task becomes reclaimable (default 900) |