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
{{ message }}
Repository navigation
Support the Agent Client Protocol (ACP) for agent adapters #272
Strategic, from the round-3 landscape survey: ACP is consolidating as the interop protocol (Zed registry of 60+ agents, JetBrains Air, Goose, Qwen Code, Devin Desktop all speak it), while vendor CLIs keep dying or being acquired (Gemini CLI sunset June 2026, Continue acqui-hired by Cursor, Roo Code dead, OpenCode renamed to Anomaly).
Solenta spawns CLIs over stdio today. Adding an ACP transport for agent adapters future-proofs against CLI churn and lets ACP-native agents plug in without per-vendor adapters. Also enables the inverse (Qwen's 'Claw' move): exposing Solenta itself over ACP/MCP so other agents can delegate into it, extending #157.
Deep-dive urgency (harness roadmap round): both Grok Build and Kimi Code speak ACP natively (kimi acp, Grok's leader socket) — ONE ACP client integration gives Solenta deep control of two harnesses instead of PTY-scraping them. Highest-leverage integration available right now.
Research note (freshness scan): a second harness-protocol entrant appeared — HarnessRouter with its Unified Harness Protocol (UHP, 'LiteLLM but for harnesses': canonical API for running Codex/Claude Code/Hermes). Worth watching alongside ACP; the protocol race for the harness layer is officially on.
Deep-dive (ACP spec): the mechanics worth implementing. (1) session/new forwards the CLIENT's MCP servers to the agent; additionalDirectories bounds tool file ops beyond cwd. (2) session/load replays full history as session/update notifications; resume skips replay. (3) The cancellation contract, copy verbatim: on session/cancel the client marks unfinished tool calls cancelled, MUST answer pending permission requests with cancelled; the agent swallows aborts and resolves with stopReason cancelled, never an error. (4) tool_call has kind (read/edit/delete/execute/think...) and locations[] — that is what powers follow mode. (5) fs/read_text_file/write_text_file callbacks route agent edits THROUGH the client, so the client sees every write.
From the kimi-code doc-mine: kimi acp is the structured path for the two things print mode cannot do — session/request_permission covers both approvals AND AskUserQuestion elicitation, fs/read|write_text_file reverse-RPC lets the client own file I/O, session/set_config_option exposes model/thinking/mode pickers, and orchestrator MCP servers forward via session/new. Another vote for ACP as the adapter transport.
Round 18 intel: ACP is consolidating as the orchestrator-to-agent protocol, which raises the priority of this issue:
JetBrains Air (air.dev, public preview since 2026-03, free, macOS with Win/Linux planned) is built entirely on ACP: Codex, Claude Agent, Gemini CLI, and Junie run as parallel ACP sessions, each isolated in its own Docker container or git worktree. Air is the closest funded analog to Solenta (define task -> delegate to N agents -> review with IDE-grade tooling), and JetBrains co-developed ACP with Zed, so the protocol has two major sponsors.
Zed Terminal Threads (2026-05): Zed hosts Claude Code, Amp, OpenCode as persistent sidebar threads over ACP, including a spawn_agent tool for sub-agent orchestration.
Devin Desktop speaks ACP for remote agents and hit the scaling edges we should note: large-file reads through ACP are now bounded and paginated instead of repeatedly rereading overflow files, and per-MCP-server log separation (MCP: <server> output channels) for debuggability (changelog 2026-08-10).
Also from round 21 adapter intel: kimi-code ships kimi acp natively, so a Solenta ACP adapter unlocks several providers at once.
Implementation notes when this gets picked up: bound file reads (pagination), per-server log channels from day one, and treat permission prompts as first-class ACP session/request_permission events feeding #291.
Round 26 ACP implementation traps from Goose's tracker (they ship an ACP client): (1) "ACP/CLI providers drop system prompt + tools: recipes lose instructions, response.json_schema deadlocks" (aaif-goose/goose#10275): when an ACP session is created, the client's system prompt and tool set can be silently dropped by the agent side, so the orchestrator must verify what the session actually loaded, not assume; (2) "Enabling MCP disables tools (Zed)" (#11012): enabling MCP on the client can replace rather than extend the agent's tool set. Both are silent-degradation bugs of exactly the class #324 (provider capability self-checks) is meant to catch: after session init, diff requested vs effective capabilities and warn loudly.
Go for Grok, no-go for Cursor. That's the verdict of a code-level look at how T3 Code Orchestrator V2 uses ACP (T3 main eac52f0, 2026-10-04). Full notes: research_notes/T3 orchestrator ACP UX and repros/acp_adapter.md on branch coder/i-want-you-to-research-t3-codes-orchestr-fae77a.
Why Grok first
Grok runs about 80% of Solenta's crew workers (399 of 493 historically). Headless grok -p has no prompt channel, so it is forced into always-approve, and questions only get answered on the next turn (runner.js:2702-2716).
Over ACP (grok agent stdio, present in the installed 1.0.46), Grok gets live approval, question and plan-exit requests.
T3's Grok workarounds to copy
Identify as _meta.clientType: "extension". Otherwise Grok's auto mode silently denies blocked actions, the same as -p does.
Only ever answer "allow once". Grok's "always" persists a project-wide grant.
Handle Grok's own question and plan-exit requests, or the turn hangs.
Watch Grok's own completion notification alongside the session/prompt reply, which sometimes never arrives.
Map the non-standard rate_limit stop reason to the usage-limit state.
A user Stop kills and respawns the process, because Grok otherwise sticks in task_already_running.
Not Cursor
T3 deleted its Cursor ACP code on 2026-10-02 after reliability bugs and moved to @cursor/sdk. Cursor's ACP mode also ignores client-passed MCP servers and only reads .cursor/mcp.json. Keep Cursor on print mode.
Other CLIs
Kimi (kimi acp, 0.39.1) and OpenCode (opencode acp, 1.17.12) can follow cheaply. OpenCode gets no Solenta MCP servers today, and ACP's per-session mcpServers would fix that.
Design
Protocol: speak ACP v1. v2 has been a draft since 2026-07-20 and drops session/load and the fs/terminal callbacks. Offer no fs/terminal client capabilities.
Phase 1: one ACP process per run, matching how runs work today.
New electron/acp.js, reusing the JSON-RPC client in codexJsonRpc.js and the event-translation pattern in codex-appserver.js:187-269.
Map approvals onto the Codex decision set.
Pass MCP servers per session/new; memory-sup.js:653-715 is already nearly that shape.
Add a provider kind to the permission routing, which only knows Claude and Codex today (runner.js:2324, 2610-2615).
Workers launch in Grok's auto mode, where only blocked actions ask; foreground threads use default. Keep headless as a per-provider fallback toggle, and add an idle watchdog. T3 still has Grok stuck "working" after its final answer (#15489).
Phase 2 (later): a process kept alive per thread, for soft steering (cancel plus re-prompt in the same session).
Size: about 1k lines for the first Grok slice; 1.6–2.5k including Kimi/OpenCode and tests/fixtures. T3's equivalent is about 12.6k.
What it doesn't fix
Mid-run crashes: mostly no. Keep incremental commits in worker prompts.
Whether grok agent stdio honours the per-thread GROK_HOME and its guardrail hook the way grok -p does. Also sequence this after #1425 (bound per-thread MCP endpoint) and #1428 (replay fixtures; T3's ~300-line ACP replay peer is good prior art).
Re-ranked as the #2 feature gap in the 2026-10-09 gap pass. Solenta still has 7 hand-written adapters (electron/providers.js:242-1405), so every new agent (Gemini CLI, Pi, Antigravity #452, Kiro, DeepSeek…) needs a Solenta release. Suggested scope: (1) a generic ACP stdio provider driven by a user-entered command, (2) the public ACP registry as a picker, (3) map ACP permission requests onto the existing approval cards and ACP plans onto plan cards. This would also close #452 and most of #458.
First slice (client side) is ready on thread branch coder/support-the-agent-client-protocol-acp-fo-34efb3, not yet committed:
electron/acp.js: an ACP v1 client over stdio. One turn runs initialize → session/new → session/prompt and reuses the existing JSON-RPC stdio session from codexJsonRpc.js.
Custom CLI rows (Generic CLI provider: drop in any agent binary #458) get a third Output option, Agent Client Protocol (ACP). So any ACP-native agent plugs in from Settings › Agents with no per-vendor adapter.
Message chunks stream into the reply, and tool calls show up as work-log steps.
Permission requests are answered from the thread's mode: Full access approves them, and Default rejects them with a "Denied: …" step.
Tests: custom-cli-provider.test.js uses a fake ACP agent (10/10 pass). Typecheck is clean. A CI-comparable test:electron run gives 4952 pass, 0 fail.
Not in this slice:
Interactive per-call approval in the permission UI.
session/load resume. Each turn currently replays the transcript tail, like other custom CLIs.
A handshake timeout.
The inverse direction: exposing Solenta itself over ACP.
Design: Solenta as an ACP agent (the inverse direction)
This lets Zed, JetBrains or another ACP client spawn "Solenta" as its agent and hand work to a Solenta thread. It targets ACP v1 and extends #157.
Transport
The editor spawns a thin CLI, node electron/acp-cli.js. It is a dumb pipe and contains no ACP logic:
It reads <userData>/orch-server.json for { port, token }. That's the same file the coder-threads MCP server already writes.
It opens GET /acp on 127.0.0.1:<port> with Authorization: Bearer <token> and Upgrade: solenta-acp.
It pipes stdin and stdout over the upgraded socket, both ways.
All protocol logic lives in the main process (electron/acpServer.js), next to the store and runner. That keeps behaviour identical to the in-app view, and the app stays the single writer of coder-store.json.
Auth is the orch-server session token, loopback only. Pairing tokens are not accepted on /acp. The token rotates each launch, but the CLI re-reads the file on every spawn, so this costs nothing.
If the app isn't running, the CLI writes a one-line reason to stderr and exits 1. Auto-launching the app is a follow-up.
Why not reuse the MCP tools from a standalone process: thread_status only returns the first line of the last reply. Streaming would mean polling over HTTP. Inside main, the session simply observes the runner's existing thread:updated pushes.
session/new { cwd }: resolves cwd to a registered local project using the same path matching as Add Project (findExistingProject). It then creates a fresh thread in that project, titled "ACP: …" so it is recognisable in the sidebar. The thread runs on the project's default provider.
No worktree: the thread works in the checkout the editor has open, so edits show up live in the editor. A worktree-backed session can be an opt-in later.
Unknown cwd is an error that tells the user to add the folder in Solenta first. Projects are not registered automatically.
sessionId is the thread id. The thread stays a normal Solenta thread, so the user can open it, steer it, archive it, or thread_fork from it.
session/prompt: joins the text content blocks and calls runner.startRun({ threadId, prompt }), which is the same entry point thread_send uses. It resolves when the run ends:
done → { stopReason: "end_turn" }
stopped after session/cancel → { stopReason: "cancelled" }
session/update is derived from the thread's own transcript on every push, so it works for every provider without per-adapter code:
The assistant message text grows in place. Each push sends the new characters, keyed by message id, as an agent_message_chunk.
Tool messages (role tool) send a tool_call the first time they appear. When they finish, they send a tool_call_update with completed or failed.
Work-log steps become an ACP plan, which is a full list each time. Each entry's status is completed when its step is done, otherwise in_progress.
Later:session/load (resuming an existing thread by id), and mapping thread_fork workers to ACP sub-sessions.
Permission requests
Prompts are forwarded to the client. A thread blocked on a prompt already shows up as pendingPermission in the runner push, and the session watches for a new requestId there.
It sends session/request_permission with the tool call and the options allow_once, reject_once, and allow_always when the prompt allows always-accept.
The client's answer maps to runner.respondPermission({ threadId, requestId, decision }).
First answer wins. The card still appears in the Solenta UI. If the user answers there first, the late ACP reply for a requestId that is no longer pending is ignored. A cancelled outcome counts as a deny.
Permission mode stays per thread and is set in Solenta. ACP session/set_mode → permission mode is a follow-up.
Second slice: everything listed as not done in the last comment is now done. Changes are uncommitted on this thread's branch.
Client (custom CLI rows set to ACP)
In Default mode, each agent session/request_permission becomes the thread's normal permission card (Allow / Allow always / Deny). Stop answers any open requests with cancelled, as the spec requires.
session/load resume: if the agent advertises loadSession, the thread keeps the agent's session id and skips the transcript replay. History the agent replays while loading is ignored. If the load fails, the run fails once, the dead id is dropped, and the next send replays the transcript.
60s handshake timeout for CLIs that never answer initialize.
Auth errors include the agent's own sign-in hint taken from authMethods, e.g. "run kimi login in a terminal".
The reply streams into the editor as it grows. session/cancel stops the task. A launch that needs approval tells the editor it is waiting.
task_status gains an additive reply field {id, text}.
Creating a pairing now offers a Copy editor (ACP) config button. It produces a Zed / JetBrains agent_servers entry that runs the script with the app's own binary (ELECTRON_RUN_AS_NODE).
Tests
14/14 in custom-cli-provider, 6/6 in the new acp-server, 95/95 in settingsModal.
Full test:electron with a CI-comparable env: 4961 pass, 0 fail. Typecheck is clean.
Live check: initialize and session/new work against opencode acp 1.17.12 and kimi acp 0.39.1, and both advertise loadSession. Neither completed a prompt on this machine, because of local account state (OpenCode free-tier version gate, Kimi not logged in) rather than the protocol.
Known limits:
The Solenta thread's tool calls and permission prompts are not mirrored to the editor; they stay in the app.
We never call authenticate; the user signs the agent in from a terminal once.
Activity
currentbits commentedon Aug 17, 2026
Deep-dive urgency (harness roadmap round): both Grok Build and Kimi Code speak ACP natively (kimi acp, Grok's leader socket) — ONE ACP client integration gives Solenta deep control of two harnesses instead of PTY-scraping them. Highest-leverage integration available right now.
currentbits commentedon Aug 18, 2026
Research note (freshness scan): a second harness-protocol entrant appeared — HarnessRouter with its Unified Harness Protocol (UHP, 'LiteLLM but for harnesses': canonical API for running Codex/Claude Code/Hermes). Worth watching alongside ACP; the protocol race for the harness layer is officially on.
currentbits commentedon Aug 18, 2026
Deep-dive (ACP spec): the mechanics worth implementing. (1) session/new forwards the CLIENT's MCP servers to the agent; additionalDirectories bounds tool file ops beyond cwd. (2) session/load replays full history as session/update notifications; resume skips replay. (3) The cancellation contract, copy verbatim: on session/cancel the client marks unfinished tool calls cancelled, MUST answer pending permission requests with cancelled; the agent swallows aborts and resolves with stopReason cancelled, never an error. (4) tool_call has kind (read/edit/delete/execute/think...) and locations[] — that is what powers follow mode. (5) fs/read_text_file/write_text_file callbacks route agent edits THROUGH the client, so the client sees every write.
currentbits commentedon Aug 18, 2026
From the kimi-code doc-mine: kimi acp is the structured path for the two things print mode cannot do — session/request_permission covers both approvals AND AskUserQuestion elicitation, fs/read|write_text_file reverse-RPC lets the client own file I/O, session/set_config_option exposes model/thinking/mode pickers, and orchestrator MCP servers forward via session/new. Another vote for ACP as the adapter transport.
currentbits commentedon Aug 18, 2026
Round 18 intel: ACP is consolidating as the orchestrator-to-agent protocol, which raises the priority of this issue:
spawn_agenttool for sub-agent orchestration.MCP: <server>output channels) for debuggability (changelog 2026-08-10).kimi acpnatively, so a Solenta ACP adapter unlocks several providers at once.Implementation notes when this gets picked up: bound file reads (pagination), per-server log channels from day one, and treat permission prompts as first-class ACP session/request_permission events feeding #291.
currentbits commentedon Aug 18, 2026
Round 26 ACP implementation traps from Goose's tracker (they ship an ACP client): (1) "ACP/CLI providers drop system prompt + tools: recipes lose instructions, response.json_schema deadlocks" (aaif-goose/goose#10275): when an ACP session is created, the client's system prompt and tool set can be silently dropped by the agent side, so the orchestrator must verify what the session actually loaded, not assume; (2) "Enabling MCP disables tools (Zed)" (#11012): enabling MCP on the client can replace rather than extend the agent's tool set. Both are silent-degradation bugs of exactly the class #324 (provider capability self-checks) is meant to catch: after session init, diff requested vs effective capabilities and warn loudly.
currentbits commentedon Oct 4, 2026
Go for Grok, no-go for Cursor. That's the verdict of a code-level look at how T3 Code Orchestrator V2 uses ACP (T3 main eac52f0, 2026-10-04). Full notes:
research_notes/T3 orchestrator ACP UX and repros/acp_adapter.mdon branchcoder/i-want-you-to-research-t3-codes-orchestr-fae77a.Why Grok first
grok -phas no prompt channel, so it is forced into always-approve, and questions only get answered on the next turn (runner.js:2702-2716).grok agent stdio, present in the installed 1.0.46), Grok gets live approval, question and plan-exit requests.T3's Grok workarounds to copy
_meta.clientType: "extension". Otherwise Grok's auto mode silently denies blocked actions, the same as-pdoes.session/promptreply, which sometimes never arrives.rate_limitstop reason to the usage-limit state.task_already_running.Not Cursor
T3 deleted its Cursor ACP code on 2026-10-02 after reliability bugs and moved to
@cursor/sdk. Cursor's ACP mode also ignores client-passed MCP servers and only reads.cursor/mcp.json. Keep Cursor on print mode.Other CLIs
Kimi (
kimi acp, 0.39.1) and OpenCode (opencode acp, 1.17.12) can follow cheaply. OpenCode gets no Solenta MCP servers today, and ACP's per-sessionmcpServerswould fix that.Design
session/loadand the fs/terminal callbacks. Offer no fs/terminal client capabilities.electron/acp.js, reusing the JSON-RPC client incodexJsonRpc.jsand the event-translation pattern incodex-appserver.js:187-269.session/new;memory-sup.js:653-715is already nearly that shape.runner.js:2324,2610-2615).automode, where only blocked actions ask; foreground threads usedefault. Keep headless as a per-provider fallback toggle, and add an idle watchdog. T3 still has Grok stuck "working" after its final answer (#15489).What it doesn't fix
config.tomlcorruption is already fixed by Concurrent 'grok mcp add' writes corrupt ~/.grok/config.toml and kill every grok run #626 and Grok MCP registration is fire-and-forget and user-global: boot race, no project binding, log-only failures #706.Check first
Whether
grok agent stdiohonours the per-threadGROK_HOMEand its guardrail hook the waygrok -pdoes. Also sequence this after #1425 (bound per-thread MCP endpoint) and #1428 (replay fixtures; T3's ~300-line ACP replay peer is good prior art).currentbits commentedon Oct 9, 2026
Re-ranked as the #2 feature gap in the 2026-10-09 gap pass. Solenta still has 7 hand-written adapters (
electron/providers.js:242-1405), so every new agent (Gemini CLI, Pi, Antigravity #452, Kiro, DeepSeek…) needs a Solenta release. Suggested scope: (1) a generic ACP stdio provider driven by a user-entered command, (2) the public ACP registry as a picker, (3) map ACP permission requests onto the existing approval cards and ACP plans onto plan cards. This would also close #452 and most of #458.currentbits commentedon Oct 19, 2026
First slice (client side) is ready on thread branch
coder/support-the-agent-client-protocol-acp-fo-34efb3, not yet committed:electron/acp.js: an ACP v1 client over stdio. One turn runs initialize → session/new → session/prompt and reuses the existing JSON-RPC stdio session from codexJsonRpc.js.custom-cli-provider.test.jsuses a fake ACP agent (10/10 pass). Typecheck is clean. A CI-comparabletest:electronrun gives 4952 pass, 0 fail.Not in this slice:
session/loadresume. Each turn currently replays the transcript tail, like other custom CLIs.currentbits commentedon Oct 19, 2026
Design: Solenta as an ACP agent (the inverse direction)
This lets Zed, JetBrains or another ACP client spawn "Solenta" as its agent and hand work to a Solenta thread. It targets ACP v1 and extends #157.
Transport
node electron/acp-cli.js. It is a dumb pipe and contains no ACP logic:<userData>/orch-server.jsonfor{ port, token }. That's the same file the coder-threads MCP server already writes.GET /acpon127.0.0.1:<port>withAuthorization: Bearer <token>andUpgrade: solenta-acp.electron/acpServer.js), next to the store and runner. That keeps behaviour identical to the in-app view, and the app stays the single writer ofcoder-store.json./acp. The token rotates each launch, but the CLI re-reads the file on every spawn, so this costs nothing.thread:updatedpushes.Session ↔ thread
initialize: returnsprotocolVersion: 1,agentCapabilities: { loadSession: false }andauthMethods: [].session/new { cwd }: resolvescwdto a registered local project using the same path matching as Add Project (findExistingProject). It then creates a fresh thread in that project, titled "ACP: …" so it is recognisable in the sidebar. The thread runs on the project's default provider.cwdis an error that tells the user to add the folder in Solenta first. Projects are not registered automatically.sessionIdis the thread id. The thread stays a normal Solenta thread, so the user can open it, steer it, archive it, or thread_fork from it.session/prompt: joins the text content blocks and callsrunner.startRun({ threadId, prompt }), which is the same entry pointthread_senduses. It resolves when the run ends:done→{ stopReason: "end_turn" }session/cancel→{ stopReason: "cancelled" }failed→ a JSON-RPC error carryinglastErrorquota-waitkeeps the prompt opensession/cancel: callsrunner.stopRun({ threadId }).session/updateis derived from the thread's own transcript on every push, so it works for every provider without per-adapter code:agent_message_chunk.tool) send atool_callthe first time they appear. When they finish, they send atool_call_updatewithcompletedorfailed.plan, which is a full list each time. Each entry's status iscompletedwhen its step is done, otherwisein_progress.session/load(resuming an existing thread by id), and mappingthread_forkworkers to ACP sub-sessions.Permission requests
pendingPermissionin the runner push, and the session watches for a newrequestIdthere.session/request_permissionwith the tool call and the optionsallow_once,reject_once, andallow_alwayswhen the prompt allows always-accept.runner.respondPermission({ threadId, requestId, decision }).requestIdthat is no longer pending is ignored. Acancelledoutcome counts as a deny.session/set_mode→ permission mode is a follow-up.First slice (this thread)
initialize,session/new,session/prompt,session/cancel, message chunks, tool calls, plan, andrequest_permission./acpupgrade.currentbits commentedon Oct 19, 2026
Second slice: everything listed as not done in the last comment is now done. Changes are uncommitted on this thread's branch.
Client (custom CLI rows set to ACP)
session/request_permissionbecomes the thread's normal permission card (Allow / Allow always / Deny). Stop answers any open requests withcancelled, as the spec requires.session/loadresume: if the agent advertisesloadSession, the thread keeps the agent's session id and skips the transcript replay. History the agent replays while loading is ignored. If the load fails, the run fails once, the dead id is dropped, and the next send replays the transcript.initialize.authMethods, e.g. "runkimi loginin a terminal".Solenta as an ACP agent (
electron/acp-server.js)task_launch/task_send/task_status/task_stop). Pairing scope, capabilities, launch approval and rate limits therefore still apply.session/cancelstops the task. A launch that needs approval tells the editor it is waiting.task_statusgains an additivereplyfield{id, text}.agent_serversentry that runs the script with the app's own binary (ELECTRON_RUN_AS_NODE).Tests
custom-cli-provider, 6/6 in the newacp-server, 95/95 insettingsModal.test:electronwith a CI-comparable env: 4961 pass, 0 fail. Typecheck is clean.initializeandsession/newwork againstopencode acp1.17.12 andkimi acp0.39.1, and both advertiseloadSession. Neither completed a prompt on this machine, because of local account state (OpenCode free-tier version gate, Kimi not logged in) rather than the protocol.Known limits:
authenticate; the user signs the agent in from a terminal once.currentbits commentedon Oct 19, 2026
Landed from Solenta thread "Fork: Support the Agent Client Protocol (ACP) for agent adap". Closed on merge.
Run ACP agents as custom CLIs, and let editors drive Solenta over ACP (…