# VS Code 那个 ACP Client，把 Claude/Codex/Gemini CLI 都塞进侧栏了

**URL:** <https://www.shiqidu.com/t/topic/1801>\
**Category:** 人工智能\
**Tags:** Claude, AICoding, VSCode, Codex, Gemini\
**Created:** [2026 年10 月 26 日 12:47 UTC](https://www.shiqidu.com/t/topic/1801 "2026-10-26T12:47:43Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

作者： ![shiqidu\_editor](https://www.shiqidu.com/user_avatar/www.shiqidu.com/shiqidu_editor/32/528_2.png) [@shiqidu\_editor](https://www.shiqidu.com/u/shiqidu_editor)\
发布日期： [2026 年10 月 26 日 12:47 UTC](https://www.shiqidu.com/t/topic/1801/1 "2026-10-26T12:47:43Z")

</div>

刷到 Zed 那边在推 Agent Client Protocol（ACP）。官方站点 [agentclientprotocol.com](http://agentclientprotocol.com) 的说法是：编辑器和 coding agent 之间不用再各家单独对接，用一套类似 LSP 的标准协议。本地常见的形式是 JSON-RPC 2.0 跑在 stdio 上：扩展启动 agent 子进程，通过 stdin/stdout 收发按行分隔的 JSON。远端/HTTP 那部分公开文档还标着 in progress，还没完全可用。Cursor CLI 文档里也有 `agent acp` 这种对接方式，说明 ACP 不只绑某一家编辑器；VS Code 这边靠的是社区扩展当 Client。

VS Code 本体不自带 ACP。Zed 的编辑器目录页（zed.dev/acp/editor/vscode）点名的是 Marketplace 上的 ACP Client（扩展 ID：`formulahendry.acp-client`，仓库 [GitHub - formulahendry/vscode-acp: Agent Client Protocol client for VS Code — connect to any ACP-compatible AI coding agent (Claude, Codex, Copilot, Qwen, Gemini, OpenCode, Kiro, OpenClaw, Hermes and more) · GitHub](https://github.com/formulahendry/vscode-acp)）。装法：扩展市场搜「ACP Client」，或 Ctrl/Cmd+P 后 `ext install formulahendry.acp-client`；Open VSX 也能装。装完活动栏多一个 ACP 图标，点开面板，直接点预置 agent，或点 `+` 自己加 `command` / `args` / `env`（设置键 `acp.agents`）。公开要求 Node.js 18+、VS Code 1.85+，对面 agent 得在 PATH 里或能 `npx` 拉起来。命令面板里还有 `ACP: Connect to Agent`、`ACP: Show Protocol Traffic` 之类，快捷键默认 Ctrl/Cmd+Shift+A 开聊天面板。

侧栏里就是聊天：流式回复、展开 tool call、权限弹窗；agent 侧可以读工作区文件、跑终端。想看它的思考过程可以展开 Thinking 折叠块；agent 如果广播了 slash command，输入框会有补全。README 预置了一串，例如 GitHub Copilot（`npx @github/copilot-language-server@latest --acp`）、Claude Code（`@agentclientprotocol/claude-agent-acp`）、Gemini CLI（`--experimental-acp`）、Qwen Code、Codex CLI（`@zed-industries/codex-acp`）、OpenCode、OpenClaw、Kiro、Hermes 等。同一时间只连一个，能在列表里切。会话列表有的走 agent 的 `session/list`，没有就本地按工作区缓存，切面板聊天记录公开说明会保留。工具栏上的 mode / model / reasoning 选择器，按说明是 agent 广播什么就显示什么；还没迁到 Session Config Options 的 agent，仍走旧的 Mode & Model Picker。协议流量可开 `acp.logTraffic`，输出到 ACP Traffic 通道，连不上时可以看这个。`acp.defaultWorkingDirectory` 空着就用当前工作区，要固定某个子目录就在设置里改。

踩坑基本都在 agent 侧。

鉴权、订阅、API Key 一般归各 CLI 自己管，扩展不替你存密钥。连上之后主要是处理 `session/request_permission` 一类权限；`acp.autoApprovePermissions` 默认 `ask`，别一上来就改成 `allowAll` 然后忘了，agent 能写文件、跑终端，权限弹窗就是让人把关的。某个 agent 起不来，先在终端单独跑它的 `acp` / `--acp` 命令看报错。PATH、Node 版本、没登录、公司代理拦了 `npx`，这些比扩展本身出问题常见得多。Hermes 是 Python 包不是 npm，公开 README 写明要自己装好、`hermes` 进 PATH，并且从同一个 shell/venv 启动 VS Code，Windows 还得走 WSL2。Gemini 那条带 `--experimental-acp`，从名字就能看出是实验功能，版本一变行为可能就变了。换模型失败多半是 agent 没登好或当前会话不支持那个选项，不是扩展写死了几个模型名。自动批准开得太宽，文件改了一大片再回滚就麻烦了，这跟协议无关，是权限设置的问题。

别跟 MCP 混在一起排查：ACP 管的是编辑器和 agent 之间，MCP 管的是 agent 和外部工具/服务之间。扩展 Known Issues 目前还写着附件功能尚未可用、部分 agent 要额外鉴权配置，这些会随版本变。官方 clients 列表里 VS Code 方向不止这一个（ACP Patchbay、ACP Pro 等），要多会话或能力校验可以再比；想先熟悉一下协议，Marketplace 这个 Client 加一个你本机已经会用的 agent CLI 就够了。版本号和预置命令以后也会更新，装的时候对一下 Marketplace 和 README。

相关链接：

- 协议说明：[https://agentclientprotocol.com/](https://agentclientprotocol.com/)
- Marketplace：[ACP Client - Visual Studio Marketplace](https://marketplace.visualstudio.com/items?itemName=formulahendry.acp-client)
- 仓库：[https://github.com/formulahendry/vscode-acp](https://github.com/formulahendry/vscode-acp)
