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/acp-server.md
+3-1Lines changed: 3 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -32,6 +32,8 @@ The Agent Client Protocol (ACP) is a protocol that standardizes communication be
32
32
33
33
Use the `--acp` option of the `copilot` command to start the CLI's ACP server. You can specify the transport mode with either the `--stdio` or `--port` options. If no transport mode is specified, the server defaults to stdio mode.
34
34
35
+
ACP mode allows sessions with a configured bring-your-own-key (BYOK) provider (`COPILOT_PROVIDER_*` environment variables) to run without {% data variables.product.github %} login, matching the behavior of `-p`/interactive mode.
36
+
35
37
### Options applied to every session
36
38
37
39
The ACP `session/new` request only lets a client set a few session parameters, such as the working directory and the MCP servers to use. It does not carry tool-filtering or reasoning settings. To configure those, pass the corresponding options when you **start the server**. The server stores the values and applies them as the initial configuration for every session it creates or loads, for any client that connects. A connecting client does not choose these values—whoever launches the server does.
@@ -91,7 +93,7 @@ There is a growing ecosystem of libraries for interacting with ACP servers progr
91
93
To run this example, you need the following dependencies:
92
94
93
95
*[Node.js](https://nodejs.org) version 18 or later.
94
-
* {% data variables.copilot.copilot_cli %}, installed and authenticated.
96
+
* {% data variables.copilot.copilot_cli %}, installed and either authenticated with {% data variables.product.github %} or configured with a BYOK provider (see [Starting the ACP server](#starting-the-acp-server)).
95
97
* The `@agentclientprotocol/sdk` package, which provides the ACP TypeScript library. Install it by running `npm install @agentclientprotocol/sdk`.
|`copilot`| Launch the interactive user interface. |
22
22
|`copilot completion SHELL`| Print a shell script for the chosen shell that can be used to enable tab completion for {% data variables.copilot.copilot_cli_short %}. Supported shells: `bash`, `zsh`, `fish`. See [Using `copilot completion`](#using-copilot-completion). |
23
-
|`copilot help [TOPIC]`| Display help information. Help topics include: `billing`, `config`, `commands`, `environment`, `logging`, `monitoring`, `permissions`, and `providers`. |
23
+
|`copilot help [TOPIC]`| Display help information. Help topics include: `billing`, `config`, `commands`, `environment`, `logging`, `monitoring`, `permissions`, `providers`, and `sandbox`. |
24
24
|`copilot init`| Initialize {% data variables.product.prodname_copilot_short %} custom instructions for this repository. |
25
25
|`copilot login`| Authenticate with {% data variables.product.prodname_copilot_short %} via the OAuth device flow. Accepts `--host HOST` to specify the {% data variables.product.github %} host URL (default: `https://github.com`). |
26
26
|`copilot login [OPTION]`| Authenticate with {% data variables.product.prodname_copilot_short %} via the OAuth device flow. See [`copilot login` options](#copilot-login-options). |
|`COPILOT_GITHUB_TOKEN`| Authentication token. Takes precedence over `GH_TOKEN` and `GITHUB_TOKEN`. |
566
566
|`COPILOT_HOME`| Override the configuration and state directory. Default: `$HOME/.copilot`. |
567
567
|`COPILOT_LARGE_OUTPUT_THRESHOLD_BYTES`| Maximum UTF-8 byte size for tool output returned directly to the model. Default: `20480` (20 KiB). See [AUTOTITLE](/copilot/concepts/agents/copilot-cli/context-management#managing-large-tool-output). |
568
+
|`COPILOT_MCP_TOOL_CACHE`| Set to `false` to disable loading and persisting local MCP server tool snapshots for the entire process. See [Tool snapshot caching](#tool-snapshot-caching). |
568
569
|`COPILOT_MODEL`| Set the AI model. |
569
570
|`COPILOT_PROMPT_FRAME`| Set to `1` to enable the decorative UI frame around the input prompt, or `0` to disable it. Overrides the `PROMPT_FRAME` experimental feature flag for the current session. |
570
571
|`COPILOT_SKILLS_DIRS`| Comma-separated list of additional directories for skills. |
@@ -691,6 +692,13 @@ Use `copilot mcp` to manage MCP server configurations from the command line with
691
692
|`timeout`| No | Tool call timeout in milliseconds. |
692
693
|`type`| No |`"local"` or `"stdio"`. Default: `"local"`. |
693
694
|`deferTools`| No |`"auto"` (default) or `"never"`. Set to `"never"` to keep this server's tools always visible even when tool search is active. |
695
+
|`disableToolCache`| No | Set to `true` to skip loading and persisting the tool snapshot for this server. |
696
+
697
+
### Tool snapshot caching
698
+
699
+
{% data variables.copilot.copilot_cli_short %} persists a snapshot of each local server's tool list so tools are available immediately on startup while live discovery completes in the background. Live discovery always runs and replaces the snapshot once it finishes.
700
+
701
+
Set `disableToolCache: true` on a server to force live discovery for that server only, or set the `COPILOT_MCP_TOOL_CACHE=false` environment variable to disable snapshot loading and persistence for the entire process. Both opt-outs leave existing cache files untouched.
Copy file name to clipboardExpand all lines: content/copilot/reference/copilot-cli-reference/cli-config-dir-reference.md
+3Lines changed: 3 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -509,6 +509,9 @@ These settings apply across all your sessions and repositories. You can use the
509
509
|`toolSearch`|`boolean`| model- and feature-dependent | Controls tool search (deferred tool loading). Set `toolSearch: false` to opt out of tool search. |
510
510
|`updateTerminalTitle`|`boolean`|`true`| Show the current intent in the terminal tab or window title. |
511
511
512
+
> [!TIP]
513
+
> Run `copilot help sandbox` for the full sandbox reference, including supported hosts (macOS Seatbelt, Linux bubblewrap, and Windows) and all `sandbox` settings keys.
Copy file name to clipboardExpand all lines: content/copilot/reference/hooks-reference.md
+15Lines changed: 15 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -510,6 +510,8 @@ Tools with no Claude equivalent keep their runtime names.
510
510
511
511
### `subagentStop` / `SubagentStop`
512
512
513
+
Fires when a subagent completes normally, before returning results to the parent. `stopReason` is currently always `"end_turn"`. This hook fires before large-response spill handling, so `response` (or `last_assistant_message` in the {% data variables.product.prodname_vscode_shortname %} compatible format) carries the full final subagent response text.
514
+
513
515
**camelCase input:**
514
516
515
517
```typescript
@@ -518,8 +520,11 @@ Tools with no Claude equivalent keep their runtime names.
518
520
timestamp: number;
519
521
cwd: string;
520
522
transcriptPath: string;
523
+
agentId: string;
524
+
agentType: string;
521
525
agentName: string;
522
526
agentDisplayName?:string;
527
+
response: string; // Full final subagent response text
523
528
stopReason: "end_turn";
524
529
}
525
530
```
@@ -533,8 +538,11 @@ Tools with no Claude equivalent keep their runtime names.
533
538
timestamp: string; // ISO 8601 timestamp
534
539
cwd: string;
535
540
transcript_path: string;
541
+
agent_id: string;
542
+
agent_type: string;
536
543
agent_name: string;
537
544
agent_display_name?:string;
545
+
last_assistant_message: string; // The `response` text
538
546
stop_reason: "end_turn";
539
547
}
540
548
```
@@ -621,6 +629,13 @@ The `preToolUse` hook can control tool execution by writing a JSON object to std
621
629
|-------|--------|-------------|
622
630
|`decision`|`"block"`, `"allow"`|`"block"` forces another agent turn using `reason` as the prompt. |
623
631
|`reason`| string | Prompt for the next turn when `decision` is `"block"`. |
632
+
|`modifiedResponse`| string |**`subagentStop` only.** Replaces the response returned to the parent when the subagent is allowed to complete—useful for redacting or reformatting subagent output. Not applicable to `agentStop`. |
633
+
634
+
`decision` and `reason` behave the same for both `agentStop` and `subagentStop`. `modifiedResponse` applies only to `subagentStop`:
635
+
636
+
* A valid `block` decision wins over `modifiedResponse`: if a hook returns both, the subagent continues and the rewrite is discarded.
637
+
* Rewrites do not compose across multiple matching hooks. Every hook receives the same original `response`, and the last hook to return `modifiedResponse` wins—chaining a redactor and a formatter does not feed the redacted text into the formatter.
638
+
* The output field names (`decision`, `reason`, `modifiedResponse`) are the same for both the camelCase and {% data variables.product.prodname_vscode_shortname %} compatible configs.
624
639
625
640
> [!NOTE]
626
641
> **Runaway guard.** After 8 consecutive `block` continuations, the CLI overrides the hook and ends the turn anyway, to prevent an unbounded loop. Use the `stop_hook_active` input field on `agentStop` to detect that this turn was already forced to continue, and self-limit before hitting the cap.
0 commit comments