GitHub Copilot CLI: Enhanced agents, context management, and new ways to install
Source: GitHub Changelog
New models and easier model management
GPT‑5 mini and GPT‑4.1, models that are included with your Copilot subscription and do not consume premium requests on paid plans, are now available. Run /model to see all model options.
If you select a model that’s disabled in your policy settings, the CLI now prompts you to enable it directly—no need to leave the terminal. This works in the model picker, /model command, and --model flag for Copilot Pro/Pro+ users.
Built-in custom agents
Copilot CLI now includes specialized custom agents for common tasks:
- Explore – Fast codebase analysis. Ask questions about your code without cluttering your main context.
- Task – Runs commands like tests and builds. Receive brief summaries on success, full output on failure.
- Plan – Creates implementation plans by analyzing dependencies and structure.
- Code‑review – Reviews changes with a high signal‑to‑noise ratio, surfacing only genuine issues.
Copilot delegates to these agents automatically when appropriate and can run multiple agents in parallel. When combined with Agent Skills, you can more easily integrate agentic workflows into your Copilot CLI experience.
Installation
Windows (WinGet)
winget install GitHub.Copilot
macOS and Linux (Homebrew)
brew install copilot-cli
macOS and Linux (install script)
curl -fsSL https://gh.io/copilot-install | bash
Package‑manager and install‑script installations automatically update.
- Codespaces and dev containers – Copilot CLI is included in the default GitHub Codespaces image and available as a Dev Container Feature.
- Standalone executables are also available in GitHub release artifacts for all platforms.
Automation and scripting
New flags make Copilot CLI easier to use in scripts and pipelines via copilot -p:
| Flag | Description |
|---|---|
--silent | Suppress stats and logs for clean, parseable output |
--share [PATH] | Export session transcript to a markdown file |
--share-gist | Export session to a shareable GitHub gist |
--available-tools | Allowlist specific tools |
--excluded-tools | Denylist specific tools |
--additional-mcp-config | Add MCP config files per‑session |
Refer to copilot --help for a full list of optional flags.
- CI/CD authentication – Set
GITHUB_ASKPASSto point to an executable that returns your token; useful for credential managers and pipelines. - Copilot Spaces – The GitHub MCP server now includes Copilot Spaces tools for project‑specific context.
Context management
- Auto‑compaction – When approaching 95 % of the token limit, Copilot automatically compresses your history.
/compact– Manually compress context anytime./context– Visualize token usage with a detailed breakdown.--resume– Press TAB to cycle through local sessions and remote Copilot coding‑agent sessions.
Terminal experience
- Better diffs – Intra‑line syntax highlighting shows exactly what changed and now integrates with Git’s configured pager.
- Tab completion – Autocomplete paths in
/cwdand/add-dir. - Ctrl + T – Toggle model reasoning visibility in supported models.
- Cleaner history – Agent‑run commands are excluded from Bash/PowerShell history.
Web access controls
The new web_fetch tool retrieves content from URLs as markdown. URL access is controlled through ~/.copilot/config with allowed_urls and denied_urls patterns. These rules also apply to shell commands like curl and wget.
Update with your package manager, or run:
npm install -g @github/copilot@latest
Join the discussion in Copilot CLI’s public repository.