heartbeat_task
Extend the lease on a claimed task to prevent reassignment by other agents. Report session state (working, waiting, errored) to communicate progress or delays during long operations.
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 |
|---|---|---|---|
| task_id | Yes | The claimed task ID | |
| lease_seconds | No | New lease duration in seconds from now (30-3600, default 300) | |
| 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. |