Reference·ACPIndex

ACP

Run Nodecode in Zed, JetBrains or any Agent Client Protocol client: nodecode acp is the agent the editor starts.

.mdllms.txt

The Agent Client Protocol is how an editor runs a coding agent: it starts the agent as a process and speaks JSON-RPC on its stdin and stdout. nodecode acp is that process for your home's organism. The sessions the editor opens are your home's sessions: the shell, the web page and the channels see them too, and nodecode resume opens them.

Set it up

Zed, in settings.json:

{
  "agent_servers": {
    "Nodecode": { "type": "custom", "command": "nodecode", "args": ["acp"] }
  }
}

Then pick Nodecode in the Agent Panel's new-thread menu (Zed: custom agents).

JetBrains IDEs, in ~/.jetbrains/acp.json:

{
  "agent_servers": {
    "Nodecode": { "command": "nodecode", "args": ["acp"] }
  }
}

Any other client runs nodecode acp, with -p NAME before acp for another profile and --store PATH or --ephemeral after it for another store. It speaks protocol version 1.

What the editor asks

The editor sendsNodecode
session/newOpens a session working in the editor's folder.
session/promptRuns a turn and answers with how it ended: end_turn, or cancelled. A turn that fails answers with its error.
session/cancelCancels the running turn.
session/loadSends the session's conversation again, then answers.
session/resumeOpens the session without sending its conversation again.
session/listLists this home's sessions, newest first, those of one folder when the editor names it.
session/closeCancels the running turn and lets the session go. It stays in your home.
session/set_config_optionChanges the session's model or reasoning effort.

A prompt's text, the files the editor attaches and its pictures go to the model as one message. An attached file the editor sends whole is written out in the message under its path; one it only links is named by its path, for Nodecode to read itself.

What the editor shows

NodecodeThe editor gets
The answer as it streamsagent_message_chunk
Thinking as it streamsagent_thought_chunk
A tool call starting, then its resulttool_call, then tool_call_update with the output
A prompt someone typed in the same session elsewhereuser_message_chunk
A name given to the sessionsession_info_update
A question the organism puts to you, such as the guard's asksession/request_permission, its choices as the options

A tool call is titled with the note on the first line of its snippet (;; list the folder), else the snippet's first line.

Models and reasoning

Each session offers two config options. model lists the models of every provider you connected, as /models does, grouped by provider. effort lists the reasoning rungs the model admits; a model that does not reason has no effort. A pick on a session that already ran moves it the way /models does: from its next turn, and as the default new sessions start on. A pick before the first turn holds for that session alone.

Slash commands

The editor lists the organism's slash commands, and a prompt that starts with one runs it, as a channel runs it: /rename, /models, /context, /status and the commands your cells add. Its answer is the turn's text. /clear, /undo and /redo are left out of the list, since each moves the conversation under the editor's transcript, which the editor cannot be told to redraw. Start a new thread in the editor instead. Typed, they still run.

The organism's life

WhenNodecode
No organism runsnodecode acp starts one, which stops when the editor closes its stdin. A running turn stops with it, and the next start picks it up.
One already runs (nodecode gateway on, an open shell)It attaches. The organism keeps running when the editor goes.
The organism goes while the editor stays: a shell that started it quits, an update restarts itEach session attaches again to whatever serves next, starting one when none does, and goes on past the last thing it read. A turn that was running is answered when it ends on the next boot.
Nothing serves again within 60 secondsRunning prompts fail, and nodecode acp exits 1.

Run nodecode gateway on to keep one organism serving the editor, the shell and the channels alike.

Writing anything else to nodecode acp's stdout, or reading its stderr as protocol

stdout is the protocol, one JSON-RPC message a line. What Nodecode has to say beside it goes to stderr.

Instead: Let the editor own stdin and stdout.

Expecting the editor's MCP servers in Nodecode

Nodecode does not connect the MCP servers an editor offers in session/new.

Instead: Name them in Nodecode's own MCP configuration.

Expecting Nodecode to read and write files through the editor

Nodecode runs its tools in its own process on your machine, as it does in the shell. The editor sees a tool call and its output, not each file it touched.

Instead: Review changes in the editor's git view.

See RPC for driving the organism with the gateway's own commands, and The gateway for keeping it running.

Esc

    Loading the index…

    ↑↓ moveEnter openEsc close