claim_path
Lock a repo path before editing so concurrent AI sessions cannot collide. Fails fast when another live session holds the path, returning the holder so work can be rerouted.
Instructions
Cooperatively lock a path on the session bus before editing it. Fail-fast: if another live session holds the lock the claim is refused and the holder is returned; coordinate or pick another territory instead of retrying in a loop. A lock on a folder covers everything under it, so a claim above or inside a path another session holds is refused too, and a relative path is read from this session's project. Locks expire after ttl_seconds (default 900, max 3600) and die with their session.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Repo-relative or absolute path (file or folder) to lock. | |
| session_id | No | Leave out: the lock is always taken by this server's own session, and any other id is refused. | |
| ttl_seconds | No | Lock lifetime in seconds (1-3600, default 900). |