ACP Support
Command Code supports Agent Client Protocol, which allows using Command Code in all ACP compatible editors.
Zed and any other editor that speaks the Agent Client Protocol can run Command Code as an ACP server via the cmd acp command. Command Code via ACP keeps the harness features: same tools, skills, permission engine, and sessions while the ACP host handles the transport.
Configure the ACP editor to run Command Code via the cmd acp command.
Basic usage
Install cmd
Install cmd, and make sure you are logged in.
Add Command Code to Zed's settings
Open Zed's settings (zed: open settings) and add this at the top level, next to keys like theme:
Start a thread
Open the agent panel, click +, and pick Command Code. Each thread is a Command Code session.
Any ACP client works the same way: start cmd acp, send initialize, then session/new with the project directory, then session/prompt.
| 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. |
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 that support configurable effort get an effort option. default is the provider's own setting and is where an untouched model starts.
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.
| 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. |