github / github/copilot-cli

Auto-detect parallelizable tasks and suggest /fleet mode

未關閉
#1,833 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
area:agents area:tools
主要語言
Shell
星號
11.2k
分支
1.9k
平均合併
14 小時 16 分鐘
30 天內合併 PR
6

描述

## Feature Request

### Summary
Copilot CLI should automatically detect when a user prompt contains parallelizable subtasks and proactively suggest using `/fleet` mode, rather than requiring the user to know about and manually invoke `/fleet`.

### Problem
Currently, `/fleet` mode is opt-in via an explicit command. This means:
- Users who don't know about `/fleet` will always run tasks serially, missing significant speed gains.
- Even users who know about `/fleet` must manually assess whether their prompt is parallelizable before deciding to use it.
- The CLI already has the intelligence to decompose tasks into subtasks (it does this *inside* fleet mode) — it just doesn't surface that analysis *before* execution.

### Proposed Solution
When a user submits a prompt (without `/fleet`), Copilot CLI should:
1. Analyze the prompt for independent, parallelizable subtasks.
2. If parallelizable work is detected, prompt the user:
> *"I detected 3 independent tasks here (auth tests, payments tests, notifications tests). Want me to run them in parallel with fleet mode? (y/n)"*
3. If the user confirms, execute in fleet mode. If declined, proceed serially as usual.

This keeps the user in control (addressing cost and coordination concerns) while surfacing the optimization opportunity they might otherwise miss.

### Why not just always use fleet?
Fleet mode has real tradeoffs that justify keeping it opt-in:
- **Cost**: Each subagent consumes its own token budget — fleet can multiply usage significantly.
- **Coordination risk**: Parallel agents editing files concurrently can cause merge conflicts, duplicate code, or inconsistent patterns.
- **Not everything is parallelizable**: Many prompts are inherently sequential. Auto-detecting true independence vs. hidden dependencies is non-trivial — getting it wrong produces broken code.
- **Determinism**: Serial execution is more predictable and easier to debug.

The "suggest, don't assume" approach addresses all of these — the user gets the benefit of the CLI's analysis without losing control.

### Expected UX Flow
```
> Add unit tests for the auth module, payments module, and notifications module

🔀 I detected 3 independent subtasks that could run in parallel with /fleet.
This would be ~3x faster but uses more tokens. Run in fleet mode? [y/N]
```

### Alternatives Considered
- **Always auto-fleet**: Too aggressive — cost and correctness concerns.
- **Status quo (manual /fleet only)**: Leaves optimization opportunity hidden from most users.
- **Config flag to always fleet**: Possible, but per-prompt suggestion is more flexible.

### Additional Context
This feels like a natural evolution of fleet mode — ship the explicit command first (done ✅), then add smart suggestions on top.

---
*Moved from cli/cli#12837 (closed as not_planned — wrong repo).*

貢獻指南

開啟貢獻指南

評估

這個 Issue 還沒有評估資料。

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。