You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+15-10Lines changed: 15 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,16 +8,17 @@ An [Agent Client Protocol (ACP)](https://github.com/agentclientprotocol/agent-cl
8
8
9
9
## About
10
10
11
-
This is an `ai-assisted` personal project aimed at bringing Cursor's agent into Zed. It acts as a **wrapper around native `agent acp`**, auto-approving tool calls when you opt in and preserving compatibility features that the current native ACP server does not expose yet.
11
+
This is an `ai-assisted` personal project aimed at bringing Cursor's agent into Zed. It uses a hybrid approach: native `agent acp` where that helps ACP/session compatibility, and the legacy `agent --print --output-format stream-json` prompt path where that preserves richer tool-call details in clients.
12
12
13
13
**Based on [claude-code-acp](https://github.com/zed-industries/claude-code-acp)** by Zed Industries - the original ACP adapter for Claude Code that served as the architectural foundation for this project.
14
14
15
15
## Features
16
16
17
-
### Native-backed
17
+
### Hybrid backend
18
18
19
-
-**Native ACP backend**: Uses `agent acp` instead of the older `agent --print --output-format stream-json` wrapper path
20
-
-**Tool and message streaming**: Forwards native ACP `session/update` notifications to the client
19
+
-**Command-preserving prompt execution**: Uses the legacy `agent --print --output-format stream-json` prompt path so shell tool calls keep the exact command text (`pwd`, `npm test`, etc.) in ACP clients
20
+
-**Native ACP compatibility layer**: Keeps native `agent acp` for ACP/session compatibility work where the native backend is still useful
21
+
-**Tool and message streaming**: Uses the stream-json mapper for prompt turns and still forwards native ACP `session/update` notifications where applicable
21
22
-**Cursor extension RPCs**: Forwards native `cursor/*` extension methods and notifications (e.g. `cursor/ask_question`, `cursor/update_todos`) to the outer ACP client when supported
22
23
-**Cursor commands and skills**: Relies on native ACP `available_commands_update` for Cursor/user commands and skills
23
24
-**Native command precedence**: When Cursor advertises a slash command, the adapter forwards that command to native ACP instead of intercepting it locally
@@ -38,11 +39,12 @@ This is an `ai-assisted` personal project aimed at bringing Cursor's agent into
38
39
39
40
- Native Cursor ACP on the currently validated CLI does **not** expose `session/list`, `session/resume`, or `session/set_model`
40
41
- Resuming after restarting `cursor-acp` uses native `session/load` when a stored `backendSessionId` is available; if that fails, the adapter starts a **new** native session and replays local JSONL so visible history is preserved
42
+
- Prompt execution intentionally stays on the legacy stream-json runner because current native execute-tool updates do not include the original command string
41
43
-`debug` mode is intentionally not exposed in this phase
42
44
43
-
## Breaking changes (native ACP & Yolo)
45
+
## Breaking changes (hybrid backend & Yolo)
44
46
45
-
If you used an older `cursor-acp`that drove Cursor through the legacy **`agent --print --output-format stream-json`** path, upgrading changes behavior in ways that are easy to mistake for “bugs” unless you know what moved:
47
+
Recent `cursor-acp`versions changed backend strategy more than once. The current release is hybrid: prompt execution uses the legacy **`agent --print --output-format stream-json`** path again so commands render correctly, while native `agent acp` is still used for compatibility/session features where it helps.
46
48
47
49
### Configuration env vars removed
48
50
@@ -52,12 +54,13 @@ Earlier releases documented `CURSOR_ACP_DEFAULT_MODE` and `CURSOR_ACP_DEFAULT_MO
52
54
53
55
Older builds accepted `bypassPermissions` and `autoRunAllCommands` as synonyms for **`yolo`** in `default_mode` and in `/mode`. Those names are **no longer accepted**—use **`yolo`** (or pick **Yolo** in the client).
54
56
55
-
### Native `agent acp` backend
57
+
### Hybrid backend
56
58
57
-
-**Execution model**: The adapter now spawns **native `agent acp`** and speaks ACP to Cursor’s server. Session traffic, slash-command routing, and tool permission flows follow **native ACP**, not the previous wrapper-only protocol.
59
+
-**Execution model**: Prompt turns run through the legacy stream-json CLI path, while session compatibility features still use native `agent acp` where useful.
60
+
-**Why this changed**: Current Cursor native ACP execute-tool updates collapse shell commands to a generic `Terminal` tool call with no original command string. The legacy stream-json path preserves `shellToolCall.args.command`, which lets ACP clients render the true command.
58
61
-**Slash commands**: If Cursor advertises a command name that matches a built-in wrapper command (for example `/model`), the **native command wins** and is forwarded to the backend; the wrapper no longer always intercepts those names.
59
-
-**Permissions**: Tool and action approval is mediated through **native `requestPermission`** notifications. The adapter translates them to the outer ACP client unless you opt into Yolo (below).
60
-
-**Resume / listing**: Resume uses native **`session/load`** when a stored backend session id is available; native Cursor ACP still does not expose everything the outer protocol can represent (see **Known limitations**). Expect differences versus the old stream-json session lifecycle.
62
+
-**Permissions**: Prompt-time tool visibility now comes from the stream-json path, while wrapper mode handling still controls retries and Yolo behavior.
63
+
-**Resume / listing**: Resume still uses native **`session/load`** when a stored backend session id is available; native Cursor ACP still does not expose everything the outer protocol can represent (see **Known limitations**).
61
64
62
65
### Yolo mode (`yolo`)
63
66
@@ -210,6 +213,8 @@ You can also bind a keyboard shortcut to quickly open a new Cursor thread by add
210
213
211
214
If something isn't working, open Zed's Command Palette and run `dev: open acp logs` to inspect the ACP messages being sent between Zed and cursor-acp.
212
215
216
+
Set `CURSOR_ACP_DEBUG_LOG=1` if you also want the adapter to write extra debug traces to `~/.cursor-acp/logs/debug.log`.
0 commit comments