You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/copilot/reference/copilot-cli-reference/cli-command-reference.md
+30-9Lines changed: 30 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -181,6 +181,7 @@ For a complete list of available slash commands enter `/help` in the CLI's inter
181
181
|`--banner`, `--no-banner`| Show or hide the startup banner. |
182
182
|`--bash-env`| Enable `BASH_ENV` support for bash shells. |
183
183
|`--config-dir=PATH`| Set the configuration directory (default: `~/.copilot`). |
184
+
|`--connect[=SESSION-ID]`| Connect directly to a remote session (optionally specify a session ID or task ID). Conflicts with `--resume` and `--continue`. |
184
185
|`--continue`| Resume the most recent session. |
185
186
|`--deny-tool=TOOL ...`| Tools the CLI does not have permission to use. Will not prompt for permission. For multiple tools, use a quoted, comma-separated list. |
186
187
|`--deny-url=URL ...`| Deny access to specific URLs or domains, takes precedence over `--allow-url`. For multiple URLs, use a quoted, comma-separated list. |
@@ -198,7 +199,7 @@ For a complete list of available slash commands enter `/help` in the CLI's inter
198
199
|`--log-level=LEVEL`| Set the log level (choices: `none`, `error`, `warning`, `info`, `debug`, `all`, `default`). |
199
200
|`--max-autopilot-continues=COUNT`| Maximum number of continuation messages in autopilot mode (default: unlimited). See [AUTOTITLE](/copilot/concepts/agents/copilot-cli/autopilot). |
200
201
|`--mode=MODE`| Set the initial agent mode (choices: `interactive`, `plan`, `autopilot`). Cannot be combined with `--autopilot` or `--plan`. |
201
-
|`--model=MODEL`| Set the AI model you want to use. |
202
+
|`--model=MODEL`| Set the AI model you want to use. Pass `auto` to let {% data variables.product.prodname_copilot_short %} pick the best available model automatically. |
202
203
|`--mouse[=VALUE]`| Enable mouse support in alt screen mode. VALUE can be `on` (default) or `off`. When enabled, the CLI captures mouse events in alt screen mode—scroll wheel, clicks, etc. When disabled, the terminal's native mouse behavior is preserved. Once set the setting is persisted by being written to your configuration file.|
203
204
|`--no-ask-user`| Disable the `ask_user` tool (the agent works autonomously without asking questions). |
@@ -214,7 +215,7 @@ For a complete list of available slash commands enter `/help` in the CLI's inter
214
215
|`--plain-diff`| Disable rich diff rendering (syntax highlighting via the diff tool specified by your git config). |
215
216
|`--plugin-dir=DIRECTORY`| Load a plugin from a local directory (can be used multiple times). |
216
217
|`--remote`| Enable remote access to this session from {% data variables.product.prodname_dotcom_the_website %} and {% data variables.product.prodname_mobile %}. See [AUTOTITLE](/copilot/how-tos/copilot-cli/steer-remotely). |
217
-
|`--resume=SESSION-ID`| Resume a previous interactive session by choosing from a list (optionally specify a session ID). |
218
+
|`--resume=SESSION-ID`| Resume a previous interactive session by choosing from a list (optionally specify a session ID or unique prefix of 7+ hex characters). |
218
219
|`-s`, `--silent`| Output only the agent response (without usage statistics), useful for scripting with `-p`. |
|`--secret-env-vars=VAR ...`| Redact an environment variable from shell and MCP server environments (can be used multiple times). For multiple variables, use a quoted, comma-separated list. The values in the `GITHUB_TOKEN` and `COPILOT_GITHUB_TOKEN` environment variables are redacted from output by default. |
@@ -227,7 +228,7 @@ For a complete list of available slash commands enter `/help` in the CLI's inter
227
228
For a complete list of commands and options, run `copilot help`.
228
229
229
230
> [!NOTE]
230
-
> The `--remote` and `--no-remote` options require the remote sessions feature to be available on your account.
231
+
> The `--remote`, `--no-remote`, and `--connect` options require the remote sessions feature to be available on your account.
231
232
232
233
## Tool availability values
233
234
@@ -256,7 +257,7 @@ The `--available-tools` and `--excluded-tools` options support these values:
256
257
257
258
| Tool name | Description |
258
259
|---|---|
259
-
|`task`| Run sub-agents|
260
+
|`task`| Run subagents|
260
261
|`read_agent`| Check background agent status |
261
262
|`list_agents`| List available agents |
262
263
@@ -333,7 +334,7 @@ Settings cascade from user to repository to local, with more specific scopes ove
333
334
334
335
| Key | Type | Default | Description |
335
336
|-----|------|---------|-------------|
336
-
|`allowed_urls`|`string[]`|`[]`| URLs or domains allowed without prompting. |
337
+
|`allowedUrls`|`string[]`|`[]`| URLs or domains allowed without prompting. |
|`model`|`string`| varies | AI model to use (see the `/model` command). |
349
+
|`model`|`string`| varies | AI model to use (see the `/model` command). Set to `"auto"` to let {% data variables.product.prodname_copilot_short %} pick the best available model automatically. |
349
350
|`powershellFlags`|`string[]`|`["-NoProfile", "-NoLogo"]`| Flags passed to PowerShell (`pwsh`) on startup. Windows only. |
350
351
|`effortLevel`|`string`|`"medium"`| Reasoning effort level for extended thinking (e.g., `"low"`, `"medium"`, `"high"`, `"xhigh"`). Higher levels use more compute. |
351
352
|`mergeStrategy`|`"rebase"`\|`"merge"`| — | Conflict resolution strategy for `/pr fix conflicts`. When set to `"rebase"`, conflicts are resolved by rebasing onto the base branch. When set to `"merge"`, the base branch is merged into the feature branch. If not configured, a picker dialog is shown. |
@@ -355,7 +356,6 @@ Settings cascade from user to repository to local, with more specific scopes ove
355
356
|`storeTokenPlaintext`|`boolean`|`false`| Store authentication tokens in plain text in the configuration file when no system keychain is available. |
356
357
|`streamerMode`|`boolean`|`false`| Hide preview model names and quota details (useful when demonstrating {% data variables.copilot.copilot_cli_short %}). |
357
358
|`theme`|`"auto"`\|`"dark"`\|`"light"`|`"auto"`| Terminal color theme. |
358
-
|`trusted_folders`|`string[]`|`[]`| Folders with pre-granted file access. |
359
359
|`mouse`|`boolean`|`true`| Enable mouse support in alt screen mode. |
360
360
|`respectGitignore`|`boolean`|`true`| Exclude gitignored files from the `@` file picker. |
361
361
|`disableAllHooks`|`boolean`|`false`| Disable all hooks. |
@@ -860,7 +860,7 @@ The `notification` hook fires asynchronously when the CLI emits a system notific
860
860
|------|---------------|
861
861
|`shell_completed`| A background (async) shell command finishes |
862
862
|`shell_detached_completed`| A detached shell session completes |
863
-
|`agent_completed`| A background sub-agent finishes (completed or failed) |
863
+
|`agent_completed`| A background subagent finishes (completed or failed) |
864
864
|`agent_idle`| A background agent finishes a turn and enters idle state (waiting for `write_agent`) |
865
865
|`permission_prompt`| The agent requests permission to execute a tool |
866
866
|`elicitation_dialog`| The agent requests additional information from the user |
@@ -1000,6 +1000,27 @@ MCP servers are loaded from multiple sources, each with a different trust level.
1000
1000
1001
1001
All MCP tool invocations require explicit permission. This applies even to read-only operations on external services.
1002
1002
1003
+
### Enterprise MCP allowlist
1004
+
1005
+
{% data variables.product.prodname_enterprise %} organizations can enforce an allowlist of permitted MCP servers. When active, the CLI evaluates each non-default server against the enterprise policy before connecting.
1006
+
1007
+
When a {% data variables.product.prodname_enterprise %} registry policy is detected (or the `MCP_ENTERPRISE_ALLOWLIST` experimental feature flag is enabled), the CLI:
1008
+
1009
+
1. Computes a fingerprint for each configured non-default server based on its command, arguments, and remote URL.
1010
+
1. Sends the fingerprints to the enterprise allowlist evaluate endpoint.
1011
+
1. Allows only servers whose fingerprints are approved; all others are blocked with a message naming the enterprise.
1012
+
1013
+
This check is fail-closed: if the evaluate endpoint is unreachable or returns an error, non-default servers are blocked until the policy can be verified.
1014
+
1015
+
When a server is blocked by an enterprise allowlist, the CLI displays:
1016
+
1017
+
```text
1018
+
MCP server "SERVER-NAME" was blocked by your enterprise "ENTERPRISE-NAME".
1019
+
Contact your enterprise administrator to add this server to the allowlist.
1020
+
```
1021
+
1022
+
Built-in default servers are always exempt from allowlist enforcement.
1023
+
1003
1024
### Migrating from `.vscode/mcp.json`
1004
1025
1005
1026
If your project uses `.vscode/mcp.json` (VS Code's MCP configuration format), migrate to `.mcp.json` for {% data variables.copilot.copilot_cli %}. The migration remaps the `servers` key to `mcpServers`.
@@ -1077,7 +1098,7 @@ Custom agents are specialized AI agents defined in Markdown files. The filename
1077
1098
|`description`| string | Yes | Description shown in the agent list and `task` tool. |
1078
1099
|`infer`| boolean | No | Allow auto-delegation by the main agent. Default: `true`. |
1079
1100
|`mcp-servers`| object | No | MCP servers to connect. Uses the same schema as `~/.copilot/mcp-config.json`. |
1080
-
|`model`| string | No | AI model for this agent. When unset, inherits the outer agent's model. |
1101
+
|`model`| string | No | AI model for this agent. When unset, inherits the outer agent's model. When the session model is set to `Auto` (server-selected), subagents always inherit the resolved session model regardless of this field. |
1081
1102
|`name`| string | No | Display name. Defaults to the filename. |
1082
1103
|`tools`| string[]| No | Tools available to the agent. Default: `["*"]` (all tools). |
Copy file name to clipboardExpand all lines: content/copilot/reference/copilot-cli-reference/cli-config-dir-reference.md
+3-4Lines changed: 3 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -50,7 +50,7 @@ Common settings include:
50
50
51
51
| Key | Type | Description |
52
52
|-----|------|-------------|
53
-
|`model`| string | AI model to use (e.g., `"gpt-5.2"`, `"claude-sonnet-4.6"`) |
53
+
|`model`| string | AI model to use (for example, `"gpt-5.2"`, `"claude-sonnet-4.6"`). Set to `Auto` to let {% data variables.product.prodname_copilot_short %} pick the best available model automatically.|
54
54
|`effortLevel`| string | Reasoning effort level for models that support it |
55
55
|`theme`| string | Color theme: `"auto"`, `"dark"`, or `"light"`|
56
56
|`mouse`| boolean | Enable mouse support in alt screen mode (default: `true`) |
0 commit comments