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:

  1. Lint — npm run lint (or equivalent) passes
  2. Type check — npm run typecheck passes (if applicable)
  3. Tests — existing tests pass, new tests written for new behavior
  4. Build — npm run build succeeds

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:

  1. Create .management/copilot-tasks.md with the four sections above
  2. Seed 5-10 independent, low-to-medium effort tasks from the backlog
  3. 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.”
  4. 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.