claim
Reserve file or directory paths before editing to avoid conflicts with other agents. Use atomic claims, wait for busy paths, and read the attached brief to stay informed of relevant notices and decisions.
Instructions
Lease repo paths to yourself before editing them, atomically: every path becomes yours or none does. A directory covers its contents, and re-claiming a path you hold renews it. ok carries a brief of the unread notices, contracts, decisions and memory notes for those paths, and marks the notices shown as seen: read it before editing. conflict lists each overlapping lease; do not edit, or pass wait_secs so the daemon waits for the paths instead of you retrying. To see who holds a path without taking it use claims_list; to extend leases use renew.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| agent | Yes | Your stable agent name. | |
| brief | No | Attach the brief. Default true. | |
| paths | Yes | Repo-relative files or directories. A directory covers everything beneath it. | |
| reason | Yes | Why you need these paths; shown to any agent that is refused. | |
| ttl_secs | No | Lease length in seconds. Default 600, max 3600. | |
| wait_secs | No | On conflict, wait up to this many seconds (max 120) for the paths to free. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| more | No | Per brief section, how many matching rows were left out; page with the list tools when not zero. | |
| memory | No | Brief: up to 5 memory notes about these paths, as digests with an excerpt. Bodies via memory_read. | |
| status | Yes | ok: every path is yours. conflict: nothing was claimed. cancelled: a wait whose caller left. invalid: bad input. | |
| message | No | Human-readable detail, on most outcomes other than ok. | |
| notices | No | Brief: up to 5 unread notices for these paths (id, kind, summary, by). Now marked seen by you. | |
| claim_id | No | The new lease; null when every path was only renewed. | |
| conflicts | No | On conflict, one per overlapping path: path, overlaps, owner, reason, expires_at. | |
| contracts | No | Brief: up to 5 contracts these paths consume (name, version, kind). Bodies via contract_get. | |
| decisions | No | Brief: up to 5 decisions affecting these paths (id, title). | |
| new_paths | No | Paths claimed by this call. | |
| expires_at | No | RFC 3339 end of the lease unless renewed. | |
| renewed_paths | No | Paths you already held, renewed. | |
| absorbed_paths | No | Paths you held beneath a directory just claimed, folded into it. | |
| previous_owner | No | For a new path whose lease another agent lost in the last hour: path, owner, reaped_at. It may be half-edited. |