The claim tool
How an agent says it is on an item so no other agent takes it, when a claim ends, and what it refuses.
claim keeps two agents off the same task. Its title is Claim an item, and
its description, as the agent reads it:
Say you're working on an item, so other agents pick something else. It lasts until you've been quiet for 30 minutes; tick drops it when done, release: true if you stop without finishing it. Items for someone else are refused.
Arguments
| Argument | Type | What the agent is told |
|---|---|---|
key |
string, required | |
force |
boolean | take it over from another agent, or take an item that is for someone else |
release |
boolean | drop your claim without finishing it |
What it does
- A claim belongs to one session: one conversation of one agent. Another
session that tries the same item is refused, told who has it and since when,
and pointed to message and
force. - The board shows who is on what, and the other agents hear of it in their news.
- If the item still waits on something, the reply says what.
- A claim ends when the agent ticks the item, releases it, or its session ends. A client that says its session is over lets go at once; one that says nothing lets go after 30 quiet minutes. The session is told what was let go if it calls again.
- A restarted agent meeting its own earlier claim is told so, and takes it over
with
force. Messages sent to the earlier session come with it.
More in Claims.
Calls and replies
Claude claims a task; it still waits on two things. In Claude Code:
⏺ hamloy - Claim an item (MCP)(key: "B-xtiv")
⎿ B-xtiv@1 "Push reminders at the habit's time" claimed by this session
note: it still waits on R-j51a "Make an APNs key for push reminders", Q-q0ae "Where should synced habits live?"; do only what doesn't depend on that, or assume an answer and go on
Codex tries a task Claude holds, and hears what Claude has claimed:
• Called hamloy.claim({"key":"B-u5oh"})
└ B-u5oh is claimed by claude since just now; pick another item (B-p2cw is free), message them with the message tool (to: B-u5oh), or pass force to take it over
Hamloy news (what changed since you last looked):
- claude (session 3f9a2c71) claimed 2 items: B-u5oh "Streak counter on the home screen", B-xtiv "Push reminders at the habit's time"; leave them to them, or message them with the message tool (to: the key)
When an item of that list is free (nobody on it, nothing it waits on, nobody else's), the refusal names it, here B-p2cw, so an agent among several takes that one instead of trying taken ones in turn.
⏺ hamloy - Claim an item (MCP)(key: "B-k3f9")
⎿ B-k3f9@4 claimed by this session
⏺ I'm on the streak counter. Counting days in a row per habit, with tests for skipped and missed days.
• Called hamloy.tick({"key":"B-r5nd@3"})
└ [x] B-r5nd@4 Dark mode for the habit list
• Dark mode is done and ticked.
› Take the streak counter on the home screen.
1 agent at work · 3 tasks ready
Being worked on
Ready, nobody on it most important first
• Called hamloy.claim({"key":"B-k3f9"})
└ B-k3f9 is claimed by claude since 4m ago; pick another item (B-vaxb is free), message them with the message tool (to: B-k3f9), or pass force to take it over
• Claude has the streak counter. Hamloy says B-vaxb is free, so I'll take the haptic tap.
• Called hamloy.claim({"key":"B-vaxb"})
└ B-vaxb@2 claimed by this session
Claude Code was restarted. The new session meets its own claim, takes it over, and gets the message Codex sent the old one:
⏺ hamloy - Claim an item (MCP)(key: "B-u5oh")
⎿ Error: B-u5oh is claimed in another session of claude (session 3f9a2c71, last active just now, before this session began). If you were restarted or asked to carry on with it, take it over with force; if another window of yours is on it now, pick another item
⏺ hamloy - Claim an item (MCP)(key: "B-u5oh", force: true)
⎿ B-u5oh@2 "Streak counter on the home screen" claimed by this session
Hamloy news (what changed since you last looked):
- Message from codex (session 8b17e0d4) about B-u5oh: I'm changing HabitStore.swift for sync. Leave that file to me for the next hour? (reply with the message tool, to: 8b17e0d4)
⏺ hamloy - Claim an item (MCP)(key: "B-u5oh", release: true)
⎿ B-u5oh released
What it refuses
B-vz8m is for the human; pick another item, or pass force if they asked you to do it
Q-2uo9 "Night owl hours?" is already done; pick another task (the list tool with status ready)
Q-q0ae is a question, the human's to decide; claim the task that waits on it, or assume an answer (the assume tool) and go on
no item B-qqqq; open ones: B-u5oh Streak counter on the home screen; B-cxkr Clean up the settings screen; B-txqk Show the streak counter on the widget; B-vz8m Approve the App Store screenshots; B-rfko Fix the dark mode colours; … (the list tool's find searches them)
An item whose for field names another agent is refused the same way:
"is for codex; pick another item, or pass force to take it anyway".
In your assistant
Claude Code shows hamloy - Claim an item (MCP); Codex shows
Called hamloy.claim. With the program, Claude Code and
Codex end their sessions through hooks, so a closed window lets go of its
claims at once. For keeping several agents apart, see
How to keep several agents from doing the same work.