Skip to content

Commit 235ee54

Browse files
docs-botgithub-actions[bot]hubwriter
authored
docs: update copilot-cli content from source docs (#60853)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: hubwriter <hubwriter@github.com>
1 parent 911f0e2 commit 235ee54

File tree

3 files changed

+34
-14
lines changed

3 files changed

+34
-14
lines changed

content/copilot/reference/copilot-cli-reference/cli-command-reference.md

Lines changed: 30 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,7 @@ For a complete list of available slash commands enter `/help` in the CLI's inter
181181
| `--banner`, `--no-banner` | Show or hide the startup banner. |
182182
| `--bash-env` | Enable `BASH_ENV` support for bash shells. |
183183
| `--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`. |
184185
| `--continue` | Resume the most recent session. |
185186
| `--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. |
186187
| `--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
198199
| `--log-level=LEVEL` | Set the log level (choices: `none`, `error`, `warning`, `info`, `debug`, `all`, `default`). |
199200
| `--max-autopilot-continues=COUNT` | Maximum number of continuation messages in autopilot mode (default: unlimited). See [AUTOTITLE](/copilot/concepts/agents/copilot-cli/autopilot). |
200201
| `--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. |
202203
| `--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.|
203204
| `--no-ask-user` | Disable the `ask_user` tool (the agent works autonomously without asking questions). |
204205
| `--no-auto-update` | Disable downloading CLI updates automatically. |
@@ -214,7 +215,7 @@ For a complete list of available slash commands enter `/help` in the CLI's inter
214215
| `--plain-diff` | Disable rich diff rendering (syntax highlighting via the diff tool specified by your git config). |
215216
| `--plugin-dir=DIRECTORY` | Load a plugin from a local directory (can be used multiple times). |
216217
| `--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). |
218219
| `-s`, `--silent` | Output only the agent response (without usage statistics), useful for scripting with `-p`. |
219220
| `--screen-reader` | Enable screen reader optimizations. |
220221
| `--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
227228
For a complete list of commands and options, run `copilot help`.
228229

229230
> [!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.
231232
232233
## Tool availability values
233234

@@ -256,7 +257,7 @@ The `--available-tools` and `--excluded-tools` options support these values:
256257

257258
| Tool name | Description |
258259
|---|---|
259-
| `task` | Run sub-agents |
260+
| `task` | Run subagents |
260261
| `read_agent` | Check background agent status |
261262
| `list_agents` | List available agents |
262263

@@ -333,7 +334,7 @@ Settings cascade from user to repository to local, with more specific scopes ove
333334

334335
| Key | Type | Default | Description |
335336
|-----|------|---------|-------------|
336-
| `allowed_urls` | `string[]` | `[]` | URLs or domains allowed without prompting. |
337+
| `allowedUrls` | `string[]` | `[]` | URLs or domains allowed without prompting. |
337338
| `autoUpdate` | `boolean` | `true` | Automatically download CLI updates. |
338339
| `banner` | `"always"` \| `"once"` \| `"never"` | `"once"` | Animated banner display frequency. |
339340
| `bashEnv` | `boolean` | `false` | Enable `BASH_ENV` support for bash shells. |
@@ -345,7 +346,7 @@ Settings cascade from user to repository to local, with more specific scopes ove
345346
| `includeCoAuthoredBy` | `boolean` | `true` | Add a `Co-authored-by` trailer to git commits made by the agent. |
346347
| `companyAnnouncements` | `string[]` | `[]` | Custom messages shown randomly on startup. |
347348
| `logLevel` | `"none"` \| `"error"` \| `"warning"` \| `"info"` \| `"debug"` \| `"all"` \| `"default"` | `"default"` | Logging verbosity. |
348-
| `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. |
349350
| `powershellFlags` | `string[]` | `["-NoProfile", "-NoLogo"]` | Flags passed to PowerShell (`pwsh`) on startup. Windows only. |
350351
| `effortLevel` | `string` | `"medium"` | Reasoning effort level for extended thinking (e.g., `"low"`, `"medium"`, `"high"`, `"xhigh"`). Higher levels use more compute. |
351352
| `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
355356
| `storeTokenPlaintext` | `boolean` | `false` | Store authentication tokens in plain text in the configuration file when no system keychain is available. |
356357
| `streamerMode` | `boolean` | `false` | Hide preview model names and quota details (useful when demonstrating {% data variables.copilot.copilot_cli_short %}). |
357358
| `theme` | `"auto"` \| `"dark"` \| `"light"` | `"auto"` | Terminal color theme. |
358-
| `trusted_folders` | `string[]` | `[]` | Folders with pre-granted file access. |
359359
| `mouse` | `boolean` | `true` | Enable mouse support in alt screen mode. |
360360
| `respectGitignore` | `boolean` | `true` | Exclude gitignored files from the `@` file picker. |
361361
| `disableAllHooks` | `boolean` | `false` | Disable all hooks. |
@@ -860,7 +860,7 @@ The `notification` hook fires asynchronously when the CLI emits a system notific
860860
|------|---------------|
861861
| `shell_completed` | A background (async) shell command finishes |
862862
| `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) |
864864
| `agent_idle` | A background agent finishes a turn and enters idle state (waiting for `write_agent`) |
865865
| `permission_prompt` | The agent requests permission to execute a tool |
866866
| `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.
10001000

10011001
All MCP tool invocations require explicit permission. This applies even to read-only operations on external services.
10021002

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+
10031024
### Migrating from `.vscode/mcp.json`
10041025

10051026
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
10771098
| `description` | string | Yes | Description shown in the agent list and `task` tool. |
10781099
| `infer` | boolean | No | Allow auto-delegation by the main agent. Default: `true`. |
10791100
| `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. |
10811102
| `name` | string | No | Display name. Defaults to the filename. |
10821103
| `tools` | string[] | No | Tools available to the agent. Default: `["*"]` (all tools). |
10831104

content/copilot/reference/copilot-cli-reference/cli-config-dir-reference.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ Common settings include:
5050

5151
| Key | Type | Description |
5252
|-----|------|-------------|
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. |
5454
| `effortLevel` | string | Reasoning effort level for models that support it |
5555
| `theme` | string | Color theme: `"auto"`, `"dark"`, or `"light"` |
5656
| `mouse` | boolean | Enable mouse support in alt screen mode (default: `true`) |
@@ -61,9 +61,8 @@ Common settings include:
6161
| `stream` | boolean | Stream responses token by token (default: `true`) |
6262
| `includeCoAuthoredBy` | boolean | Add Co-authored-by to agent-created commits (default: `true`) |
6363
| `respectGitignore` | boolean | Exclude gitignored files from the `@` file picker (default: `true`) |
64-
| `trusted_folders` | string[] | Folders where read/execute permission has been granted |
65-
| `allowed_urls` | string[] | URLs or domains allowed without prompting |
66-
| `denied_urls` | string[] | URLs or domains that are always denied |
64+
| `allowedUrls` | string[] | URLs or domains allowed without prompting |
65+
| `deniedUrls` | string[] | URLs or domains that are always denied |
6766
| `logLevel` | string | Log verbosity: `"none"`, `"error"`, `"warning"`, `"info"`, `"debug"`, `"all"`, or `"default"` (default: `"default"`) |
6867
| `disableAllHooks` | boolean | Disable all hooks (default: `false`) |
6968
| `hooks` | object | Inline user-level hook definitions |
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
584832db507d47454ed410791e2d0c53468bea20
1+
aaf6f363050eb7ad4b98542f7389b76f4e29f5b8

0 commit comments

Comments
 (0)