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

cmd login # Once, in a terminal. The editor reuses this account. cmd acp # What the editor runs to setup cmd ACP server on stdio, you don't run it yourself. /acp # In any session: prints the editor setup and the connection state.

1

Install cmd

Install cmd, and make sure you are logged in.

2

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:

{ "agent_servers": { "Command Code": {"command": "cmd", "args": ["acp"]} } }
3

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 featureCommand Code
Streamed replyText and reasoning as they are written.
Tool callsOne row per call with the file it touches. Edits show their diff before the tool runs.
Permission promptsAllow once, allow always, reject once, reject always. "Always" is remembered per tool for the thread.
Planstodo_write fills the editor's plan view. Todos are disabled by default: run cmd mods enable todos -g, then restart cmd acp (ACP reads user-level mod settings only).
QuestionsA question from the agent, or a plan approval, is a choice prompt.
Slash commandsYour project and user commands, skills, mod commands, and /compact.
Modesdefault, auto-accept, plan, dont-ask, bypass. The indicator follows the engine.
Model pickerThe model catalog, plus an effort option for models with a reasoning knob.
Context meterContext used, with the thread's cost so far, after every reply and after /compact.
ThreadsNew, reopen with history, list, close. The same sessions cmd --resume offers.

The model picker lists the Command Code catalog, then the providers you added yourself with /connect or in ~/.commandcode/providers.json. The same rows cmd --list-models prints. A custom model is listed by its qualified id, such as cliproxy/gpt-6-astra, and runs through that provider with your own key, as it does in the terminal. 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.

providers.json is read again every time a thread opens or switches model, so a provider you add or a key you change while the editor is open is in force on the next switch. A model you remove is refused on the next switch. A custom provider without a key is listed, and the first reply says so. Add the key with /connect in a terminal session.

A provider named after a catalog vendor, such as deepseek, that declares a catalog model's short name, such as deepseek-v4-flash, spells the catalog's own id. That id runs on Command Code, as it does in the terminal. The picker keeps the catalog row for it and lists your provider's copy as deepseek/deepseek-v4-flash@byok-deepseek. Pick that row and the reply comes through your provider with your key. The spelling exists only in the editor picker. In a terminal, pick the row under the provider's heading in /model.

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.

CommandDoes
/compactSummarizes the thread and reports what it freed. The meter updates.
/acpPrints the editor setup and whether this thread runs over ACP.
Project and user.commandcode/commands/*.md, expanded as in the terminal.
SkillsListed 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.

SymptomFix
auth_required when the thread startsRun 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 editorOpen 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 messageThe error carries the API's status and code. Credits and plan are the same as in the terminal.
The picker shows a model your plan does not includeThe picker is the full catalog. The request is refused with the plan message. Pick a model your plan covers.
"Provider not available" after a model switchThe thread should have moved providers on its own. If it did not, close the thread and open it again.
"Provider 'x' has no API key" on the first replyA provider from providers.json without a key. Add it with /connect in a terminal session, then send again.
A model from providers.json is missing from the pickerCheck cmd --list-models in a terminal. The picker shows the same rows. The id must be typed as printed there. If the provider is named after a catalog vendor and the model id is a catalog model's short name, pick the row ending in @byok-<provider>. The plain id is the catalog row and runs on Command Code.