lease_acquire
Acquire a named lease on shared state such as a checkout, dev database, or port without blocking; retake it to extend, or set wait to queue FIFO and receive a grant wake.
Instructions
Try to take a named lease on state another session could also change, such as a shared checkout, a dev database or a port (non-blocking). Re-taking your own lease extends it. With wait:true, queue FIFO on a held lease and receive one wake when granted; the requested TTL starts at grant time, and max_wait_seconds defaults to 3600. The caller must have a safe running session that can receive wakes. lease_release cancels your queued wait. The grant wake reports a deadline that may pass before delivery; call lease_acquire again before then to extend it. A worker's leases are released when hive stops its pane, parks it or confirms it dead; row_only retirement leaves them in place because it does not stop the pane. Leases expire on their own.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"key": "<key>",
"ttl_seconds": "<ttl_seconds>"
},
"name": "lease_acquire"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| key | Yes | Stable and specific, like "db:dev". | |
| wait | No | ||
| project_id | No | Different project override. Use ONLY when the user explicitly asks for another project by name; otherwise stay in the current scope, even when results are empty. | |
| ttl_seconds | Yes | ||
| max_wait_seconds | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| key | Yes | ||
| queued | No | ||
| held_by | No | ||
| acquired | Yes | ||
| extended | No | ||
| position | No | ||
| expires_at | No | ||
| project_id | Yes | ||
| hive_notice | No |