github / github/copilot-cli

Auto-detect parallelizable tasks and suggest /fleet mode

Đang mở
#1,833 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
area:agents area:tools
Ngôn ngữ chính
Shell
Star
11.2k
Fork
1.9k
Merge trung bình
14 giờ 16 phút
Pull request đã merge (30 ngày)
6

Mô tả

## 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).*

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.