github / github/copilot-cli

Declarative dependency-aware task-graph with parallel execution and automatic conflict resolution for plugin sub-agents

Open
#3,613 0 comments 0 reactions 0 assignees View on GitHub
area:agents area:plugins
Dominant language
Shell
Stars
11.2k
Forks
1.9k
Avg merge
14h 16m
Merged PRs (30d)
6

Description

### Describe the feature or problem you'd like to solve

Declarative dependency-aware task-graph with parallel execution and automatic conflict resolution for plugin sub-agents

### Proposed solution

This is a follow-up to @github/copilot-cli/issues/3568 (which was closed and I don't have permission to reopen).

Add a built-in, declarative task-graph schema to Copilot CLI plugins, allowing plugin authors to define tasks, their dependencies/order, and conflict resolution strategies. Copilot CLI would then:
- Parse the dependency graph
- Run parallelizable tasks concurrently and sequential ones in order
- Handle conflicts between parallel tasks (e.g., serialize, merge, or rerun as needed)
- Return structured per-task results to support conditional workflows

This would reduce boilerplate, simplify orchestrator plugins, and improve reliability for complex, multi-step scenarios.

### Example prompts or workflows

A scenario for .NET repo upgrades:

1. **Upgrade .NET** (must finish first)
2. **Fix vulnerability A, B, C** (run in parallel, but could conflict on shared files)
3. **Deploy** (wait for all fixes to succeed)

Sample YAML task-graph schema:

```yaml
tasks:
- id: upgrade
agent: dotnet-upgrade-agent
prompt: "Upgrade the project from net6 to net8"
- id: fix-a
agent: security-agent
prompt: "Fix vulnerability CVE-A"
dependsOn: [upgrade]
- id: fix-b
agent: security-agent
prompt: "Fix vulnerability CVE-B"
dependsOn: [upgrade]
- id: fix-c
agent: security-agent
prompt: "Fix vulnerability CVE-C"
dependsOn: [upgrade]
- id: deploy
agent: deploy-agent
prompt: "Deploy the updated app to Azure"
dependsOn: [fix-a, fix-b, fix-c]
on_conflict: serialize # e.g. serialize | merge | rerun-affected
```

Benefits:
- Plugin authors describe dependencies instead of coding their own dispatch engine.
- Copilot CLI resolves parallelism and conflicts for them.
- Structured per-task results returned (pass/fail, output, logs, etc.).
- Enables orchestrator-style plugins for batch refactor, multi-repo actions, etc.

### Additional context

Current plugin `task` tool exposes parallel dispatch, but still requires imperative handling of ordering, conflict resolution and result management. Is a declarative, dependency-aware task-graph (with automatic parallelization + conflict resolution + structured results) something you'd consider?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.