Editors with cmd acp
Run cmd acp and Command Code is the agent inside your editor. Zed and any other editor that speaks the Agent Client Protocol can start it, prompt it, and show its tool calls and edits in place.
It is the same harness as the terminal: same tools, same permission engine, same sessions on disk. The editor is another way in.
Basic usage
You never run cmd acp yourself. The editor starts it when you open a thread and stops it when you close the last one.
- Run
cmd loginin a terminal. - Open Zed's settings (
zed: open settings) and add this at the top level, next to keys liketheme:
- Open the agent panel, click +, and pick Command Code. Each thread is a Command Code session.
To run a local build instead, set command to node and args to the path of the built index.mjs followed by acp.
Any ACP client works the same way: start cmd acp, send initialize, then session/new with the project directory, then session/prompt. A check from a terminal:
The method and update reference is in the repository at packages/command/docs/acp.md.
| Editor feature | Command Code |
|---|---|
| Streamed reply | Text and reasoning as they are written. |
| Tool calls | One row per call with the file it touches. Edits show their diff before the tool runs. |
| Permission prompts | Allow once, allow always, reject once, reject always. "Always" is remembered per tool for the thread. |
| Plans | todo_write fills the editor's plan view. |
| Questions | A question from the agent, or a plan approval, is a choice prompt. |
| Slash commands | Your project and user commands, skills, mod commands, and /compact. |
| Modes | default, auto-accept, plan, dont-ask, bypass. The indicator follows the engine. |
| Model picker | The model catalog, plus an effort option for models with a reasoning knob. |
| Context meter | Context used, with the thread's cost so far, after every reply and after /compact. |
| Threads | New, reopen with history, list, close. The same sessions cmd --resume offers. |
Prompts forced for safety, such as a destructive command or a write outside the project, always ask, offer only the once options, and are never remembered.
The model picker lists the Command Code catalog. The pick belongs to the thread. It never changes another thread or your terminal default, and the thread comes back on it when reopened or resumed with cmd --resume.
Models with a reasoning knob get an effort option with that model's levels. default is the provider's own setting and is where an untouched model starts. Once you pick a level there is no way back to default in that thread.
Which provider serves a model follows the model. While your terminal is signed in to an OAuth provider such as Codex, a model that provider serves runs through it, and every other model runs through the Command Code gateway. Switching across that line rebuilds the thread's engine from the saved transcript. You see a short pause and nothing else. Your terminal's connected provider is never changed from the editor.
A switch is refused while a reply is running. Finish or stop the turn first.
Type / in the composer to see what is available. A command sent as the whole message runs it. A skill's body rides into the turn as hidden context. A mod command such as /acp answers inline without a model call.
| Command | Does |
|---|---|
/compact | Summarizes the thread and reports what it freed. The meter updates. |
/acp | Prints the editor setup and whether this thread runs over ACP. |
| Project and user | .commandcode/commands/*.md, expanded as in the terminal. |
| Skills | Listed by name, expanded as in the terminal. |
Built-ins that are terminal actions, such as /model, /resume and /tree, are not listed. Their editor equivalents are the picker, the thread list and the thread history. An unknown command is sent to the model as typed.
A file you mention with @ or drag in reaches the model as a file mention it can read. A selection the editor embeds arrives as a context block with the path and, when the editor sends one, the line number. Images pasted into the composer go to the model as images. Audio is not supported.
Command Code reads, writes and runs commands through its own permission engine. The editor's file and terminal services are not used, so unsaved buffers are not visible to the agent.
Every thread is a Command Code session with a real id. Reopening a thread replays its transcript into the editor and continues it. The thread list shows the same transcripts as cmd --resume, for this project or all projects. A session started in the editor shows up in the terminal's resume picker, and the other way round.
One cmd acp process serves one project directory. Open as many threads in it as you like. A thread for a different directory is refused until the others close, so Zed runs one agent process per project window.
Servers you configure in Command Code (cmd mcp, .mcp.json, settings mcp.servers) load as in the terminal. Servers you configure in the editor (Zed's context_servers) are connected beside them when a thread opens. The model sees one tool list and permission prompts look the same for both.
Supported from the editor: stdio commands and streamable http. The older sse transport is skipped. If both sides configure the same server name, the Command Code one wins and the editor's copy is skipped. An editor server that fails to start is logged on stderr and does not stop the thread. A server that needs OAuth is set up on the Command Code side with cmd mcp auth.
One prompt, one reply. The editor's stop button cancels the running turn. A permission prompt or question still open is settled as declined so the turn can unwind, and the thread ends with cancelled.
A mode switched in the editor and a mode the agent switches itself, such as entering plan mode, both update the editor's indicator.
ACP ships as a built-in mod, like the first-party providers. Disable it and cmd acp refuses to start:
| Symptom | Fix |
|---|---|
auth_required when the thread starts | Run cmd login in a terminal. The thread reuses that account. |
cmd acp exits with "the acp mod is disabled" | Remove acp from mods.disabled in settings. |
| Nothing shows in the editor | Open Zed's dev: open acp logs. Every cmd acp diagnostic is on stderr, prefixed [acp]. |
| "This cmd acp process serves …; start another for …" | One process serves one project. Open the other project in its own window, or close this one's threads. |
| A reply fails with a credits, limit or sign-in message | The error carries the API's status and code. Credits and plan are the same as in the terminal. |
| "Provider not available" after a model switch | The thread should have moved providers on its own. If it did not, close the thread and open it again. |
| The picker shows a model your plan does not include | The picker is the full catalog. The request is refused with the plan message. Pick a covered model. |