claim_task
Atomically assign a pending task to an agent, marking it claimed and recording the assignee. Prevents double assignment by rejecting concurrent claims and verifies dependency completion before acceptance.
Instructions
Atomically claim a pending task for an agent. Sets status to 'claimed' and records the assignee. Prevents race conditions — if two agents try to claim the same task, the second gets a clear error. Checks dependency completion before allowing claim.
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": {
"task_id": "<task_id>",
"assignee": "<assignee>"
},
"name": "claim_task"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| task_id | Yes | The task ID to claim (e.g. 'task-2026-03-09-abc123'). | |
| assignee | Yes | Identifier for the agent claiming this task (e.g. 'claude-code-1', 'agent-research'). | |
| worktree_path | No | Filesystem path to the worktree directory (e.g. '/repo/.claude/worktrees/feature-auth'). | |
| worktree_branch | No | Git branch name for this agent's worktree (e.g. 'worktree-feature-auth'). Used to track parallel work across agents. |