heartbeat_task
Extend your claim on a task to prevent reclamation while working, and optionally report session state for visibility.
Instructions
Extend the lease on a task you have claimed. Call this periodically (before lease_expires_at) while working on a long task so the claim is not reclaimed by another agent. Optionally report a session state at the same time (working / waiting_input / errored) so humans and orchestrators can see why the claim is held. Fails with 409 if you no longer hold an active claim — in that case, claim a task again rather than continuing. Hosted API only.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| state | No | Session state to report alongside the heartbeat | |
| detail | No | Free-text detail for the state (max 500 chars, e.g. 'waiting for API key'). Requires state. | |
| task_id | Yes | The claimed task ID | |
| lease_seconds | No | New lease duration in seconds from now (30-3600, default 300) |