ACP: use it from an editor or another program
maxxing-code acp speaks the Agent Client Protocol (version 1) on stdin and
stdout: JSON-RPC, one message per line. Any ACP client can drive it: editors (Zed, JetBrains, Neovim plugins) and
tools such as Harness Maxxing.
{ "agent_servers": { "Maxxing Code": { "command": "maxxing-code", "args": ["acp"] } } }
(Zed's settings.json; other clients have an equivalent place for a command and its arguments.) The API key comes
from the environment of the process or from ~/.maxxing-code/keys.json.
What is supported
| ACP | Support |
|---|---|
initialize |
protocol 1; capabilities: loadSession, images and embedded context in prompts, HTTP MCP servers, session list |
session/new |
cwd, mcpServers (stdio and HTTP; started without a trust question: they are the client's choice) |
session/load |
reopens a saved session and replays its history as updates |
session/list |
saved sessions, optionally of one cwd |
session/prompt |
text, images, resource_link (turned into a file mention), embedded text resources |
session/cancel |
interrupts the turn; the prompt answers cancelled |
session/set_mode |
default, accept-edits, plan, bypass; the agent reports mode changes with current_mode_update |
session/set_config_option |
model (any provider/model with a key) and effort |
session/request_permission |
sent for every action that asks: allow_once, allow_always (when a rule can be saved), reject_once |
session/update |
agent_message_chunk, agent_thought_chunk, tool_call, tool_call_update, plan, current_mode_update, available_commands_update, usage_update, and user_message_chunk when replaying |
Not used: the client's file system and terminal methods (the agent works directly in cwd), authentication
methods (keys are local).
How things map
- Tool calls carry a
kind(read,edit,execute,search,fetch,think,switch_mode,other), the raw input, the file location for file tools, and on completion a diff (as a fenceddiffblock) or the output. Live output of a running command arrives astool_call_updatecontent. - The task list (
todotool) is sent as an ACPplan. - Questions (
ask_user): ACP 1 has no question request, so a question is a permission request whose options are the answers (optionIdanswer-0,answer-1…) and whose title is the question. - Plan approval (
exit_plan): a permission request of kindswitch_modewhose content is the plan, with the optionsaccept-edits,defaultandplan(keep planning). - A prompt sent while a turn runs is read by the agent before its next step, and answers at once.
- Commands:
/compact,/undoand the project's custom commands are announced withavailable_commands_updateand understood at the start of a prompt.
Tokens and cost: _meta
ACP carries the size of the context, not the tokens of each model call. Maxxing Code adds them under the
maxxing-code key of _meta, which clients are free to ignore.
On every usage_update (one per model call):
{
"sessionUpdate": "usage_update",
"used": 18432, "size": 180000,
"cost": { "amount": 0.0421, "currency": "USD" },
"_meta": { "maxxing-code": {
"model": "anthropic/claude-sonnet-4-5",
"usage": { "input": 812, "output": 36, "cacheRead": 17584, "cacheWrite": 0, "reasoning": 0 },
"cost": 0.0061
} }
}
used / size are the context after this call and the usable window; cost.amount is the total of the session;
_meta holds this call alone (tokens are disjoint: input excludes cached tokens).
In the result of session/prompt:
{ "stopReason": "end_turn", "_meta": { "maxxing-code": { "usage": { … }, "cost": 0.0124, "reason": "done" } } }
reason is done, interrupted or denied (the user refused an action and the turn stopped). A turn that fails
answers with a JSON-RPC error whose data.details is the message.
On tool_call: _meta["maxxing-code"].toolName is the exact tool name (bash, edit, mcp__server__tool…).
In session/new and session/load, a client may pass _meta: { "maxxing-code": { "model", "effort", "mode" } }
to choose them before the first prompt. Without it: the MAXXING_CODE_MODEL variable, then the user's settings.
Maxxing Code