claim_acquire
Atomically claim a work item, file domain, or timed resource for an agent task, with repository scope enforcement and worktree isolation.
Instructions
Atomically acquire one work item, file domain, or timed resource.
Work-item scope uses work_item_id with activity work or update. Named resources require complete timing evidence resolved against PROJECT.yaml. Project-files excludes backlog and supports caller-requested isolation only beneath the primary worktree's canonical .worktrees/ root, with backlog omitted through worktree-specific sparse checkout. Schema-version-2 results preserve the package-owned claim engine's current outcomes, rejection fields, and exit codes.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| base | No | HEAD | |
| task | Yes | ||
| agent | Yes | ||
| files | No | ||
| trees | No | ||
| branch | No | ||
| backlog | No | Select the complete primary-worktree-only backlog. Mutually exclusive with project_files and all_files; returns SHARED_CHECKOUT_REQUIRED from another checkout. | |
| activity | No | ||
| claim_id | Yes | ||
| all_files | No | Select the primary-worktree-only union of project files and backlog. Mutually exclusive with project_files and backlog; requires scope_reason. | |
| resources | No | ||
| repository | Yes | ||
| resource_id | No | ||
| root_task_id | Yes | ||
| scope_reason | No | Bounded coordination-only reason required for tree, project_files, and all_files ownership. | |
| work_item_id | No | ||
| project_files | No | Select project files excluding backlog. Mutually exclusive with backlog and all_files; requires scope_reason. Eligible isolation is placed at the canonical primary-worktree .worktrees/<claim-id> path with backlog omitted by sparse checkout. | |
| worktree_path | No | ||
| resource_class | No | ||
| parent_claim_id | No | ||
| compat_file_directories | No | ||
| expected_duration_seconds | No | ||
| requested_hard_stop_duration_seconds | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes | ||
| exit_code | Yes |