Copilot Task Claim Protocol
Problem
Multiple AI agents sharing a working tree need conflict-free task assignment. Without a coordination mechanism, two agents can pick up the same task, modify the same files, or produce conflicting branches — wasting compute and creating merge headaches.
Solution
A .management/copilot-tasks.md file serves as the single source of truth for background task assignment. The file contains four sections:
Task Table
| ID | Description | Status | Effort | Branch |
|----|-------------|--------|--------|--------|
| BG-001 | Add ARIA labels to chat components | open | low | — |
| BG-002 | Extract Eliza task patterns | open | medium | — |
| BG-003 | Fix ESLint warnings in utils/ | claimed | low | background/task-BG-003 |Claim Protocol
An agent claims a task by creating a branch named background/task-BG-NNN. The branch name is the claim — if the branch exists, the task is taken. This is atomic because git checkout -b fails if the branch already exists.
Quality Gates
Every completed task must pass before merging:
- Lint —
npm run lint(or equivalent) passes - Type check —
npm run typecheckpasses (if applicable) - Tests — existing tests pass, new tests written for new behavior
- Build —
npm run buildsucceeds
Off-Limits Table
Files and directories that background agents must not modify:
| Path | Reason |
|------|--------|
| CLAUDE.md | Primary agent configuration |
| .management/status.md | Primary agent maintains |
| src/core/auth/ | Security-critical — Tier 1 only |Usage
To adopt this pattern in any repo:
- Create
.management/copilot-tasks.mdwith the four sections above - Seed 5-10 independent, low-to-medium effort tasks from the backlog
- Point Copilot CLI at the file: “Read .management/copilot-tasks.md. Pick an open task, claim it by creating the branch, implement it, and ensure all quality gates pass.”
- Review completed branches via PR — the primary agent or human merges
Trade-offs
When to Use
- Repos with a backlog of independent, well-scoped tasks
- Multi-pane terminal setups (Ghostty, tmux, etc.) where agents run in parallel
- Tasks that touch isolated modules with minimal cross-cutting concerns
When NOT to Use
- Single-agent workflows where coordination overhead exceeds benefit
- Tightly coupled changes that require architectural coherence across files
- Security-critical work (route to ai-agent-execution-constraints instead)
- Repos with no existing test/lint infrastructure (quality gates can’t enforce)
Source
Extracted from the copilot-cli-background-tasks research initiative during multi-agent workflow prototyping.
Related
- copilot-cli-background-tasks — Research validating this pattern
- ai-agent-execution-constraints — Constraint patterns for agent boundaries
- boundary-guard-hooks — Hook-based enforcement of agent limits
- tiered-ai-task-routing — Routing framework (cop-bg label)