agenthold_claim
Claim exclusive access to a shared resource before modifying it to prevent conflicts in multi-agent workflows. Use this tool to secure resources like files before editing when other agents may be working in the same environment.
Instructions
Claim exclusive access to a resource before modifying it. IMPORTANT: You MUST call this before editing any file or shared resource when other agents may be working in the same environment. Do not proceed with modifications until the claim is granted. Claim each resource right before you modify it — do not claim multiple resources in advance. Finish editing and release one resource before claiming the next. You must call agenthold_register first to get an agent_id. Pass the filename as the resource identifier (e.g. "intro.md", "src/main.py"). Possible responses: "claimed": You now hold exclusive access. Proceed with your edits, then call agenthold_release when done. "already_claimed": You already hold this claim. Safe to proceed. "busy": Another agent is working on this resource. Do NOT modify it. Work on a different resource, or call agenthold_wait to be notified when it becomes available. The response includes who holds the claim and when they claimed it.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| resource | Yes | Identifier for the resource, e.g. a filename like 'intro.md' or 'src/main.py' | |
| agent_id | Yes | Your agent ID, received from agenthold_register. You must register before calling this tool. |