GitHub Copilot CLI Practical Guide -- Plan, Autopilot, /fleet and How It Differs from VS Code Agent Mode¶
For / Key Points
For: Engineers using VS Code Agent Mode who haven't tried Copilot CLI yet
Key Points:
- Copilot CLI is a terminal-native AI agent that works without an editor and is Git host independent (works with GitLab/Azure Repos)
- CLI-exclusive features: Plan Mode (plan then implement), Autopilot (autonomous execution), /fleet (parallel execution)
- Install with
npm install -g @github/copilot. Available on all Copilot plans including Free
- Terminal-native AI agent that runs without an editor
- Plan Mode Plan first, then implement
- Autopilot Complete tasks without step-by-step approval
- /fleet Split tasks across parallel subagents
How It Differs from VS Code Agent Mode¶
You might think "VS Code Agent Mode is enough." Copilot CLI is a separate application that runs in your terminal1.
| Aspect | Copilot CLI | VS Code Agent Mode |
|---|---|---|
| Runtime | Terminal (no editor needed) | Inside VS Code |
| Git host dependency | None (GitLab/Azure Repos OK) | None |
| Plan Mode | Yes (Shift+Tab) | No |
| Autopilot | Yes (autonomous) | No |
| /fleet (parallel) | Yes | No |
| Session persistence | Maintains memory across sessions | Tied to editor session |
| Custom agents | Shared (CLI and VS Code) | Shared |
| MCP support | Yes | Yes |
Importantly, custom agents and Skills are shared between CLI and VS Code1. An agent defined for CLI works in VS Code and vice versa.
Installation and First Run¶
Available on all Copilot plans (Free/Pro/Pro+/Business/Enterprise).
# Install via npm
npm install -g @github/copilot
# First run (opens browser authentication)
copilot
Not the same as old gh copilot
The old gh copilot extension (deprecated October 2025, limited to suggest/explain) is a different tool. Since January 2026, running gh copilot prompts you to install the new Copilot CLI2.
Once browser authentication completes on first run, just type copilot in your terminal.
Plan Mode: Plan Before You Build¶
Press Shift+Tab to cycle through modes (standard → plan → autopilot → standard). In Plan Mode, you create a plan first, approve it, then proceed to implementation3. You can also use the /plan command directly.
You: I want to refactor utils.py by splitting it into 3 modules
Copilot [Plan Mode]: Here's my proposed plan:
1. string_utils.py — move string manipulation functions
2. file_utils.py — move file operation functions
3. date_utils.py — move date utility functions
Update imports in all files, then run tests...
Approve? [y/n]
After approval, Copilot creates and edits files step by step. Similar to Claude Code's /plan, but planning and implementation are seamlessly connected.
Autopilot Mode: Autonomous Execution¶
Switch with Shift+Tab again, or use the --autopilot flag. Completes tasks autonomously without per-step approval4.
# Launch directly with CLI flag
copilot --autopilot "Fix all failing tests"
# Prevent infinite loops: set maximum steps
copilot --autopilot --max-autopilot-continues 20
In normal mode, Copilot asks "Can I edit this file?" or "Can I run this command?" for each step. Autopilot skips these confirmations. Great for long-running tasks, but set --max-autopilot-continues as a safety limit.
/fleet: Parallel Task Execution¶
/fleet splits tasks across multiple subagents for parallel execution5. Describe your tasks in natural language and Copilot automatically splits and parallelizes them.
You: /fleet Add unit tests to src/auth.py, src/billing.py,
and src/notifications.py
Multiple subagents launch simultaneously, each independently generating test files. Much faster than sequential processing in a single session.
This feature is exclusive to CLI -- not available in VS Code Agent Mode or Claude Code.
/fleet documentation
/fleet is confirmed in the command reference, but detailed documentation may still be in progress. Check the CLI Command Reference for the latest information.
/review: Code Review¶
Use /review to have Copilot review your current changes.
You: /review
Copilot: Analyzing git diff...
## Review Results
1. src/auth.py:45 — SQL injection risk. Use parameterized queries
2. src/billing.py:12 — Unused import
...
This is a local review. No GitHub.com PR functionality is used.
Multi-Model Support¶
Copilot CLI lets you choose which model to use1.
| Model | Characteristics |
|---|---|
| Claude Opus 4.6 | High accuracy, complex tasks |
| Claude Sonnet 4.6 | Balanced |
| GPT-5.3-Codex | Code generation focused |
| Gemini 3 Pro | Google ecosystem tasks |
You can switch models mid-session. Premium models consume premium requests.
Custom Agent Definitions¶
Define custom agents using Markdown files6. Place them in .github/agents/ with the .agent.md extension for repository-level agents, or ~/.copilot/agents/ for user-level agents. They work in both CLI and VS Code.
<!-- .github/agents/test-writer.agent.md -->
# Test Writer
An agent specialized in generating test code.
## Instructions
- Use pytest
- Target 80%+ coverage
- Always include edge cases
You: @test-writer Write tests for src/auth.py
Share with your team and the same agent definitions work in GitLab or Azure Repos repositories.
Summary¶
Copilot CLI is an independent tool from "Copilot inside VS Code." It excels in these scenarios:
- SSH into remote servers where no editor is available
- Running multiple tasks in parallel (
/fleet) - Enforcing a plan-approve-implement workflow (Plan Mode)
- Using Copilot agent features with GitLab/Azure Repos
CLI and VS Code Agent Mode are complementary, not mutually exclusive. Using both is the most efficient approach -- editor for fine-grained edits, CLI for large refactoring.