Skip to content

RFD: Multi-Client Session Attach#533

Open
joaommartins wants to merge 2 commits intoagentclientprotocol:mainfrom
joaommartins:rfd/multi-client-session-attach
Open

RFD: Multi-Client Session Attach#533
joaommartins wants to merge 2 commits intoagentclientprotocol:mainfrom
joaommartins:rfd/multi-client-session-attach

Conversation

@joaommartins
Copy link

Summary

This RFD proposes a session/attach method that allows multiple ACP clients to connect to and interact with the same live agent session simultaneously — enabling a unified notification and approval UI across concurrent coding agent workflows.

Key features

  • Controller/observer roles — Controllers can send prompts and respond to permissions; observers receive the live stream read-only
  • First-writer-wins permission routingrequest_permission is broadcast to all controllers; the first response wins and all clients are notified via permission_resolved
  • historyPolicy parameter — Clients control history replay on attach: full (default), pending_only, or none
  • Proxy-based architecture — A proxy/multiplexer sits between agents and clients, meaning existing agents require zero changes
  • WebSocket + SSE transport — Multi-client attach requires a network-capable transport; the proxy handles this
  • Graceful detach and lifecyclesession/detach lets clients leave voluntarily; the session continues as long as one controller remains

Problem

ACP currently assumes a 1:1 relationship between a client and an agent session. For developers running multiple concurrent agent sessions (Claude Code, Codex, Gemini, etc.), this creates a significant context-switching tax:

  • Permission requests block in whichever terminal started the session — there is no way to respond from a unified dashboard
  • There is no way to passively observe an active session from a second client
  • session/load supports sequential handoff only — not concurrent access to a live session

Example

{
  "jsonrpc": "2.0",
  "id": 5,
  "method": "session/attach",
  "params": {
    "sessionId": "sess_abc123def456",
    "role": "controller",
    "historyPolicy": "pending_only",
    "clientInfo": {
      "name": "notification-dashboard",
      "version": "1.0.0"
    }
  }
}

Capability negotiation

{
  "agentCapabilities": {
    "sessionCapabilities": {
      "attach": {
        "roles": ["controller", "observer"]
      }
    }
  }
}

Relationship to existing RFDs

This proposal builds directly on the Agent Extensions via ACP Proxies RFD — the proxy architecture established there is the recommended implementation pattern for multi-client attach. It also depends on Session List for session discovery and complements Resuming of existing sessions.

Proposes session/attach method to allow multiple ACP clients to connect
to and interact with the same live agent session simultaneously.

Key features:
- Controller/observer client roles
- First-writer-wins permission routing
- Proxy-based architecture (builds on proxy-chains RFD)
- WebSocket/SSE transport for multi-client support

This enables unified notification dashboards, pair programming with
agents, cross-device continuity, and graceful client recovery without
requiring changes to existing agents.
Address review feedback on the initial RFD draft:

- Add status: "proposal" to frontmatter
- Add historyPolicy parameter (full/pending_only/none) to session/attach,
  giving lightweight clients control over history replay on connect
- Document historyPolicy effect on the history field in the response
- Add error response examples for session/attach failure cases
  (session not found, not authorised, capability absent)
- Add session/detach success response example
- Remove maxClients from core proposal; defer to Shiny Future as a
  possible later capability for operators to cap concurrent connections
- Fix observer role description to mention future session/promote path
- Renumber error codes to remove gap left by removed maxClients error
- Fix implementation plan wording ("with a `roles` field")
@joaommartins joaommartins requested a review from a team as a code owner February 18, 2026 03:55
@benbrandt benbrandt moved this to Draft Proposal in Roadmap Feb 19, 2026
@ElleNajt
Copy link

ElleNajt commented Feb 19, 2026

I have a use case for this and found this issue because I was considering building the same thing:

I've been building (WIP, I can't guarantee it's safe at the moment) github.com/ElleNajt/agent-to-go , where the idea is that I forward claude code terminal sessions via tmux/ttyd/tailscale to my phone.

There are similar projects, but I'm trying to build something minimal that just provides easily auditable glue interacting with and and managing coding agent CLIs on the phone -- and multiplexing an ACP session between a mobile friendly ACP front end and whatever ACP front end is on the dev machine is ideal for this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Draft Proposal

Development

Successfully merging this pull request may close these issues.

2 participants

Comments