Repository navigation
[Feature][v0.10.0] ACP mode: support more than one session per connection #3623
AndriyPytel
started this conversation in
Feature requests
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Problem
prime-agent --mode acprejects the secondsession/newon the same connection:ACP clients that keep one connection per agent and open sessions on it (JetBrains Air in IDEs, 2026.3 EAP) can therefore run only one Prime Agent session at a time. Parallel sessions per project are the main point of Air, so Prime Agent is effectively single-task there.
Where it comes from
crates/pa-daemon/src/acp/daemon.rs:DaemonAcpStateholds a singlesession: Option<HostedSession>, and the process creates and attaches one daemon session at startup.handle_session_newreturns the error above whensessionis already set.Workaround in use
A small stdio multiplexer in front of
prime-agent --mode acp: one ACP connection to the client, oneprime-agent --mode acpprocess persession/new, routing byparams.sessionIdand rewriting agent-to-client request ids. Measured cost: ~8 MB RSS and ~0.4 s startup per extra session; the daemon worker and the Python kernel per session exist either way.Question
Is single-session-per-connection a deliberate design choice, or would a change that keeps a
sessionId -> HostedSessionmap per connection (one daemon create/attach persession/new) be welcome? Happy to share the multiplexer or help with the change if a maintainer wants to take it.All reactions