Integrating Zed Editor with isA Agent Client Protocol (ACP)
The Agent Client Protocol (ACP) v1 is an open standard designed for seamless, bidirectional communication between high-performance code editors and autonomous coding agents. Starting with v1.8.0, isA_CLI (isa and aix) provides a native stdio JSON-RPC 2.0 ACP server (isa acp / aix acp), enabling the Zed editor’s Assistant panel to drive autonomous codebase investigations, refactoring loops, and multi-file code modifications directly within your editor.
1. Architecture & Stdio Hygiene Invariant
External agent integration in Zed operates by spawning an agent process as a subprocess and communicating via standard input (stdin) and standard output (stdout).
Because JSON-RPC clients in editors will crash or fail to parse frames if arbitrary debugging logs or escape sequences pollute standard output, isa acp enforces strict stdio hygiene:
- Exclusive
stdoutChannel:stdoutis exclusively dedicated to newline-delimited, ANSI-stripped JSON-RPC 2.0 frames. - Complete
stderrRedirection: All application loggers (logging.root.handlers), diagnostic traces, and runtime warnings (warnings.showwarning) are automatically re-routed tosys.stderr. - Zero Color & Escape Pollution: Environments enforce
NO_COLOR=1,ANSI_COLORS_DISABLED=1, andTERM=dumb, ensuring zero ANSI color codes or cursor manipulation sequences contaminate JSON frames. - Thread-Safe Frame Atomicity: Stdio frame writing is protected by mutual-exclusion locks (
_write_lock) to guarantee frame boundaries during concurrent prompt execution and streaming updates.
2. Prerequisites
- Zed Editor: Version
v0.160.0or later with External Agent / ACP support enabled. - isA CLI: Installed version
v1.8.0or higher:isa --version # or for enterprise on-premise aix --version - Ensure
isaoraixis accessible in your system$PATH.
3. Zed Editor Configuration (settings.json)
To configure Zed to use isa acp as an external agent, open your Zed configuration file:
- Press
Cmd+,(macOS) orCtrl+,(Linux/Windows) - Or open
~/.config/zed/settings.json(Linux) /~/Library/Application Support/Zed/settings.json(macOS)
Add the assistant block with the external_agents configuration:
Standard Public Cloud Profile (isa)
{
"assistant": {
"version": "2",
"default_model": {
"provider": "external",
"model": "isa-agent"
},
"external_agents": [
{
"name": "isA Assistant",
"command": "isa",
"args": ["acp"],
"protocol": "acp",
"env": {
"ISA_BRAND": "isa",
"ISA_PROFILE": "default"
}
}
]
}
}SweetNight Enterprise On-Premise Profile (aix)
For SweetNight engineers connecting to on-premise Lakehouse, PAM, and AEP mesh services:
{
"assistant": {
"version": "2",
"default_model": {
"provider": "external",
"model": "aix-agent"
},
"external_agents": [
{
"name": "SweetNight AIX Assistant",
"command": "aix",
"args": ["acp"],
"protocol": "acp",
"env": {
"ISA_BRAND": "aix",
"ISA_PROFILE": "sn"
}
}
]
}
}4. Protocol Lifecycle & Methods
The isa acp server implements the complete ACP v1 request and notification lifecycle:
1. Handshake (initialize)
Negotiates protocol version and verifies capability descriptors:
- Request:
{"jsonrpc": "2.0", "id": 1, "method": "initialize", "params": {"protocolVersion": 1}} - Response: Returns
protocolVersion: 1,capabilities: {}, andserverInfo: { "name": "isa-acp-server", "version": "1.8.0" }.
2. Session Instantiation (session/new)
Creates an isolated session bounded to the active project folder:
- Parameters:
cwd(string): Absolute path of project root.mcpServers(optional list): Additional MCP server connections to register for the session.sessionId(optional string): Custom UUID if supplied by client.
- Response:
{ "sessionId": "<uuid>" }
3. Prompt Execution (session/prompt)
Submits a developer prompt into the autonomous agent loop:
- Parameters:
sessionId(string): Active session UUID.prompt(string): Natural language instruction or task specification.streaming(boolean, default: true): Stream incremental updates.
- Live Notifications: During execution, the server emits
session/updatenotifications with current agent state and progress notes. - Response:
{ "stopReason": "endTurn" }(or{ "stopReason": "cancelled" }if interrupted).
4. Cancellation (session/cancel)
Safely halts active processing when the user cancels in the Zed UI:
- Parameters:
{ "sessionId": "<uuid>" } - Response:
{ "status": "cancelled" }
5. Heartbeat (ping)
Lightweight liveness probe:
- Response:
{}
5. Verification & Diagnostics
Manual Stdio Testing
You can independently verify that your local isa acp server responds to ACP handshake requests using a single shell command:
printf '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":1}}\n' | isa acpExpected JSON-RPC response on stdout:
{"jsonrpc": "2.0", "id": 1, "result": {"protocolVersion": 1, "capabilities": {}, "serverInfo": {"name": "isa-acp-server", "version": "1.8.0"}}}Verify that stderr remains silent during the handshake:
printf '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":1}}\n' | isa acp 2> acp_err.log
# acp_err.log should be empty or contain non-interfering diagnostic outputInspecting Zed Diagnostics
If Zed fails to connect to isa acp:
- In Zed, open the command palette (
Cmd+Shift+PorCtrl+Shift+P). - Run
zed: open logto inspect subprocess launch output. - Verify that
isais found in the$PATHinherited by Zed. If launched from a desktop GUI environment (macOS dock or Linux desktop launcher), specify the absolute path toisainsettings.json(e.g."/usr/local/bin/isa").