Copilot CLI as Background Task Executor
Hypothesis
Can GitHub Copilot CLI operate as an independent background task executor within a multi-agent terminal workflow, handling low-to-medium complexity tasks without disrupting the primary Claude Code planning/architecture lane?
Approach
- Configure a Ghostty 4-pane terminal layout: shell (top-left), Claude Code Opus (top-right), 2x Copilot CLI Sonnet (bottom panes)
- Create a
.management/copilot-tasks.mdfile with a seeded task table, claim protocol, quality gates, and off-limits table - Point each Copilot CLI instance at the task file and observe lane separation — does the background agent stay in its lane without polluting the primary agent’s context or working tree?
- Evaluate conflict patterns: branch collisions, merge issues, context bleed between agents
Findings
Key Observations
- Plan-mode-everywhere works: Copilot CLI respects plan-mode when configured, producing diffs for review before committing — reduces surprise breakage
- Branch-based claims are atomic: Using
background/task-BG-NNNbranch naming as the claim mechanism prevents two agents from working on the same task simultaneously - Model tiering is natural: Claude Code handles Tier 1 (architecture, security) while Copilot CLI handles Tier 3 (bulk refactoring, independent implementation) — the routing maps cleanly to the tiered-ai-task-routing framework
- Git conflicts are manageable: When tasks are genuinely independent (separate files/modules), merge conflicts are rare; when tasks touch shared files, conflicts surface early at merge time rather than silently corrupting state
- Context pollution is the main risk: Copilot CLI agents that read too broadly can make changes based on stale or incomplete understanding of architectural intent — the off-limits table mitigates this
Data
| Metric | Value |
|---|---|
| Prototype repo | 1 (ops-core staging) |
| Tasks seeded | 12 |
| Tasks completed by Copilot CLI | 8 |
| Merge conflicts | 1 (shared config file) |
| Quality gate failures | 2 (lint, missing test) |
| Avg task complexity | Low-Medium |
Outcome
Status: Active — pattern validated in one repo, needs cross-repo rollout
The hypothesis holds for independent, well-scoped tasks. Copilot CLI successfully executed 8 of 12 seeded tasks without disrupting the primary Claude Code session. The 2 quality gate failures were caught by the gate (lint and missing test), which is the system working as designed. The single merge conflict was on a shared config file — a known risk mitigated by the off-limits table.
Next Steps
- Standardize the
.management/copilot-tasks.mdtemplate via ops-core - Integrate
cop-bglabel into the tiered-ai-task-routing dispatch system - Collect metrics across 3+ repos to validate the pattern at scale
- Document Ghostty pane configuration as a reproducible setup script
- Define escalation protocol: when should a Copilot CLI task be bumped to Claude Code?
Related
- tiered-ai-task-routing — Routing framework that cop-bg extends
- claude-gemini-integration — Prior multi-agent integration research
- ai-tool-evaluation — Tool evaluation framework (Copilot CLI added as T5)
- copilot-task-claim-protocol — The claim protocol pattern extracted from this research
- ai-agent-execution-constraints — Constraint patterns relevant to background agents
- boundary-guard-hooks — Hook patterns for enforcing agent boundaries