Copilot CLI — Platform Details
Copilot-specific configuration: env var limitations, MCP config location, and @Agent invocation.
Prerequisites
Complete Steps 1–3 on the Setup page first (install plugins, init, scan).
Environment variables (AEM_INSTANCES, AXE_API_KEY, etc.) are documented there.
Shell-Only Environment Variables
The most important difference from Claude Code.
Copilot CLI Does Not Read settings.local.json
Copilot CLI only inherits shell environment variables. Plugin MCP configs using
${AEM_INSTANCES} work in Claude Code but fail silently in Copilot CLI
unless the variable is exported in your shell profile (~/.zshrc or ~/.bashrc).
All env vars from the Setup page must be in your shell profile.
If you previously set them in .claude/settings.local.json, add them to your shell profile too.
Export CLAUDE_PLUGIN_ROOT for dx skill scripts
dx skills run plugin scripts as bash "${CLAUDE_PLUGIN_ROOT}/…" (progress tracking, the preflight and
resume steps of /dx-bug-all and /dx-simple). Claude Code fills in that path itself; Copilot CLI
does not, and leaves the variable empty in its shell. Point it at the dx-core plugin once — Copilot’s install path
has no version in it, so it survives updates:
export CLAUDE_PLUGIN_ROOT=“$HOME/.copilot/installed-plugins/<marketplace>/dx-core”
/dx-init adds this line for you when it finds dx-core installed in Copilot — to every shell profile that exists (~/.zshrc, ~/.bashrc, ~/.bash_profile), because the VS Code terminal may run a different shell than your login shell — and /dx-doctor checks it. Open a new terminal before starting copilot. MCP Server Configuration
Project .mcp.json auto-loads since v1.0.12, but v1.0.40+ requires an opt-in env var.
v1.0.40+ Opt-In Required for Repo Hooks and Workspace MCP
Starting in Copilot CLI v1.0.40 (2026-05-01), repo-level hooks
(.github/hooks/hooks.json) and workspace MCP (.mcp.json) are gated behind
two opt-in environment variables. Without them, our plugin hooks and ADO/Atlassian MCP servers
will silently not load in copilot -p runs outside a trusted folder. The value must be true — Copilot ignores 1. Add to your shell profile:
export GITHUB_COPILOT_PROMPT_MODE_REPO_HOOKS=true
export GITHUB_COPILOT_PROMPT_MODE_WORKSPACE_MCP=true Project .mcp.json Auto-Loaded (v1.0.12+)
Since Copilot CLI v1.0.12 (April 2026), copilot reads .mcp.json at the
project root automatically — same as Claude Code. The legacy workaround
(—additional-mcp-config or a global ~/.copilot/mcp-config.json) is
no longer required for project-specific servers like ADO. On v1.0.40+, also export
GITHUB_COPILOT_PROMPT_MODE_WORKSPACE_MCP=true as shown above.
Plugin-bundled MCP servers (Figma, axe, AEM, Playwright) load automatically from each plugin’s
.mcp.json. Project servers (ADO, Atlassian) load from the repo-root .mcp.json
that /dx-init generates. If you previously created ~/.copilot/mcp-config.json
as a workaround, you can keep it for personal global defaults or remove it.
MCP Config Locations by Platform
| Platform | Config File | Root Key | Scope |
|---|---|---|---|
| Claude Code | .mcp.json | mcpServers | Per-project |
| VS Code Chat | .vscode/mcp.json | servers | Per-project |
| Copilot CLI | .mcp.json (project) or ~/.copilot/mcp-config.json (global) | mcpServers | Per-project (since v1.0.12) or global |
@Agent Invocation
In addition to /dx-* skills, Copilot CLI supports @Agent invocation.
| Agent | Purpose |
|---|---|
@DxPRReview | Review PRs with inline patches and severity levels |
@DxCodeReview | Deep code review with architecture analysis |
@AEMComponent | Inspect and verify AEM components |
@DxHelp | Answer architecture questions from project docs |
@DxReqAll | Full requirements pipeline |
@DxStepAll | Execute all plan steps with recovery loops |
@DxBugAll | Full bug workflow: triage → verify → fix |
@DxAgentAll | End-to-end delivery: requirements → PR |
What's New (April–May 2026)
Highlights from v1.0.15 → v1.0.40 relevant to plugin workflows.
Prompt-Mode Gates (v1.0.40)
Repo hooks and workspace MCP now require explicit opt-in env vars
(GITHUB_COPILOT_PROMPT_MODE_REPO_HOOKS,
GITHUB_COPILOT_PROMPT_MODE_WORKSPACE_MCP, value true). Without them, copilot -p runs
outside a trusted folder silently ignore repo hooks and project .mcp.json. Action required: see callout above.
Persisted Permissions Default (v1.0.37)
Location-based permission persistence is now on by default — approvals carry across sessions for the same project path. No more re-approving the same tool calls each session.
HTTP Hooks (v1.0.35)
Hooks can now POST to an HTTP endpoint instead of running a local script. Useful for autonomous
pipelines and webhook-based observability — dx-automation Lambda agents can be reached
directly from .github/hooks/hooks.json.
Stop Events (agentStop / subagentStop)
Both agentStop and subagentStop events now exist. The /dx-init
Stop guard (completion checks, code review prompts) now ports to Copilot CLI.
${PLUGIN_ROOT} env vars (v1.0.26)
PLUGIN_ROOT, COPILOT_PLUGIN_ROOT, and CLAUDE_PLUGIN_ROOT are
injected into plugin hook scripts — no more path-derivation hacks. Not into repo
hooks in .github/hooks/: there only CLAUDE_PROJECT_DIR is set (checked on
v1.0.109), so a repo hook that calls a plugin script exits 127.
Notification Hook (v1.0.18)
A new hook event with sub-types agent_completion, permission_prompt, and
elicitation_dialog. Useful for desktop notifications and audit trails.
Auto Model + Opus 4.7 (v1.0.29 / v1.0.32)
Claude Opus 4.7 supported via BYOK (v1.0.29). auto model selection picks the right tier
automatically; continueOnAutoMode keeps long autonomous runs going.
Named Sessions (v1.0.35)
—name and —resume=<name> let you keep multiple long-running sessions
addressable by name — improves multi-repo hub UX.
Autopilot Cap + ADO Detect (v1.0.40)
Autopilot continuation defaults to 5 (override with —max-autopilot-continues).
Azure DevOps repos auto-detect and auto-disable the GitHub MCP server. MCP OAuth gains
client_credentials grant type for headless setups.
Full release history
See the Copilot CLI releases page for the
complete changelog. Latest snapshot:
docs/research/2026-05-01-platform-state-update.md (delta to
docs/research/2026-04-25-platform-state-update.md).
Running Copilot CLI in VS Code
Same CLI, same behaviour — plus editor integration through /ide.
Recommended: connect the CLI to VS Code with /ide
Copilot CLI behaves the same in a VS Code integrated terminal and in any other terminal: hooks, plugins, agents and skills load from the project and ~/.copilot, not from the editor (verified on v1.0.108). Running it inside VS Code fixes none of the hook limits.
What VS Code adds is convenience. In an interactive session, /ide connects the CLI to an open VS Code window (from the built-in or an external terminal):
- Selection as context — the current editor selection is sent with your prompt, so “debug this” is enough.
- Diff review — proposed edits open as VS Code diffs with accept/reject. A useful human checkpoint before a file changes.
Limits: the workspace must be open in trusted mode; with —allow-all / —yolo edits are applied directly and no diff is shown. See GitHub docs.
Differences from Claude Code
| Aspect | Shared | Differs |
|---|---|---|
| Skills | 74 skills, same names | Copilot slash command needs the plugin prefix (/dx-core:dx-pr-review); autocomplete inserts it |
| Marketplace | Same git URL | |
| Rules | Same .claude/rules/ files | Dual frontmatter (paths: + applyTo:) |
| Agents | Claude: 12 subagents | Copilot: 24 @Agents | |
| Env Vars | Claude: shell + settings.local.json | Copilot: shell only | |
| MCP Config | Same servers | Claude: .mcp.json | Copilot: ~/.copilot/mcp-config.json |
| Permissions | Claude: prompt | Copilot: allowed-tools allowlist | |
| Subagent isolation | Claude: context: fork runs the skill in its own context | Copilot: runs inline (see below) |
Frontmatter Copilot CLI Ignores
Verified on Copilot CLI v1.0.108–v1.0.109. The skill still runs; only the isolation or routing is lost.
Skills and agents run, but without isolation
context: fork(skills). Ignored — Copilot would run the skill inline, in the main conversation. Every dx fork skill therefore starts with an Isolation check: when it finds itself inline, it hands the work to one subagent and shows you only that subagent’s report, so build output, fix attempts and long tool runs stay out of your context (verified on v1.0.109 with/dx-core:dx-step-build). The skill’s own instructions still land in the main context once.agent:(skills). Has no effect, because it only picks the subagent type for a fork. The model may still delegate to the named agent on its own, but the frontmatter does not route it.model: haikuon plugin agents. Copilot applies an agent’smodel, but falls back to the session model when it is “unavailable or ineligible” — and the Claude Code aliashaikulands there: a dx lookup agent ran on the session’s Opus model (v1.0.109). Expect higher cost on lookup agents; the.github/agentstemplates use display-name lists, which do resolve.handoffs:(.github/agents). Reported as an unknown field and not parsed. Handoff buttons do nothing in Copilot CLI; ask for the next agent in plain words.- Claude-only agent fields in
.claude/agents/. Copilot also reads that folder (for example after/dx-eject) and dropseffort,memory,maxTurns,disallowedToolsandisolationwith a warning. WithoutdisallowedToolsan agent is not read-only; use the.github/agentsversion (@DxCodeReview) on Copilot.
What does work
A subagent can call a plugin skill through the skill tool, nested at least 2 levels deep. Custom agents in .github/agents honour model (fallback list) and reasoning-effort (v1.0.88+). A custom agent you select with /agent gets the project’s instruction files (AGENTS.md, CLAUDE.md, copilot-instructions.md), but the same agent run as a subagent does not unless it sets include-custom-instructions: true (v1.0.86+; verified on v1.0.109). Every dx agent sets it — the .github/agents templates and the plugin agents (dx-code-reviewer, dx-doc-searcher, …), which almost always run as subagents — so a dx agent sees the project’s conventions however it is started, as a Claude Code agent does. Run /dx-upgrade to update existing .github/agents. Hook limits are on the Hooks page.