Skip to main content
reason acp runs Reason as an Agent Client Protocol agent over stdio. It is the link between an editor and the CLI: the editor starts reason acp, and reason acp talks to the Reason API for you. No commands run over ACP itself. Commands run on your computer through reason connect, or on a Reason cloud computer.
Building an app or editor integration (e.g. T3 Code)? Start at Build an ACP editor.Agents: https://reasonmachines.com/llms.txt
Each editor thread is a Reason Session with the same ID. It shows in the Reason app, and reason send ID "MESSAGE" continues it from a terminal.

Before you add it

Install the CLI and sign in to the Workspace you want:
An editor with terminal sign-in runs reason login for you. Otherwise set REASON_API_KEY. The key needs the scopes listed in Scopes.

Add it to an editor

Add a custom agent whose command is reason and whose argument is acp. In Zed, in settings.json:
Open the agent panel, click +, and pick Reason. For another ACP client, use the same command and argument. Reason writes its logs to stderr and speaks ACP on stdin and stdout. For a step-by-step setup of a third-party app, see Build an ACP editor.

Flags

reason acp takes the flags of reason "PROMPT", so put them in the client’s argument list. Other flags:
  • --model ID, --reasoning-effort LEVEL and --speed standard|fast set the starting choice for new threads. The editor’s pickers can change all three: each thread offers Model (model), Reasoning (reasoning_effort) and Speed (speed) session config options. A resumed or loaded thread starts at its Session’s speed. A change applies from the next prompt that starts a turn, not to a message sent into a running turn.
  • --speed fast asks the provider for its priority tier: replies come sooner and use your plan or credits faster. It takes effect where the provider offers one (today a ChatGPT subscription’s models); elsewhere the turn runs at standard speed.
  • -y (--yes) accepts every default option without asking, which editors that run the agent unattended need.
  • --workspace SLUG (before acp, as reason --workspace SLUG acp) picks a signed-in Workspace.
Use the flags reason acp --help lists in your installed version.

What the agent supports

Checked against reason acp 0.2.678 (the initialize response):
  • Load, list, resume and close a Session, so the editor can reopen a thread with its history and list recent ones.
  • Image prompts and embedded context.
  • Sign-in method reason-login, which runs reason login.
Streaming replies, reasoning, tool calls and file edits as diffs show in the editor. When Reason asks a question, the turn ends and your next prompt answers it. Images need the deployment:read scope on the API key, when you sign in with a key. Reason runs its own tools, so it does not use the editor’s file system, terminal, or MCP servers. When an editor offers MCP servers in a new, loaded or resumed Session, reason acp does not connect them. It writes one line to stderr that names the servers. The first message of that Session also tells Reason which servers the editor offered, by name and transport only, so the Session knows it cannot use them.

Troubleshooting

  • The editor shows Sign in to Reason: run reason login in a terminal, or set REASON_API_KEY in the environment that starts the editor.
  • Nothing runs on your computer: check reason status, and run reason connect if this computer is not connected.
  • A GUI editor cannot find reason: set the command to the absolute path from command -v reason, because desktop apps often start with a short PATH.