Skip to content

List the clients of a shared fx acp session and name each prompt's sender - #2305

Draft
fazxes wants to merge 10 commits into
fazxes/acp-approvals-across-clientsfrom
fazxes/acp-session-clients
Draft

fazxes wants to merge 10 commits into
fazxes/acp-approvals-across-clientsfrom
fazxes/acp-session-clients

Conversation

@fazxes

@fazxes fazxes commented Nov 25, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • A client of a shared fx acp session that lists sh.fx/sessionClients now gets its own id as sh.fx/clientId in its initialize answer, and the list of clients that have the session open in _sh.fx/session/clients_update.
  • Each entry has the client's id, the clientInfo it sent at initialize (each string cut to 256 bytes, left out when it sent none), and main, which marks the oldest client in join order.
  • fx sends the list after a client opens or closes the session or its connection ends; to a client that loads or resumes the session, before its answer and with itself in it; and to a client that opens it with session/new, after its answer. Only clients that list the capability get it, and a client that lists no sh.fx capability gets no sh.fx keys.
  • A prompt or steer chunk that fx sends to the other clients names its sender as sh.fx/client in its _meta, for listing clients only. History replay carries no sender.
  • The running copy that a joining client replays now holds each prompt chunk once, as its text or raw image bytes, and builds the version each joiner takes.
  • fx-core.wasm grows by 3,003 bytes, and its budget rises to 2,508,000.

Not built yet: a subagent's permission questions to every client.

Docs: vercel-labs/fx-web#369.

Stacked on #2276.

The model of a shared session now covers the client list: the main client, the opt-in to the list, the list before a load answer and after a session/new answer, no list without a member, and the sender id on prompt and steer chunks. Its planted bugs and rows are checked by the shared session checker and the acp check script. The end-to-end tests for the list fail until the list is built.
fx lists sh.fx/sessionClients among its capabilities and reads the client's listing of it. The initialize answer names the caller's connection as sh.fx/clientId, and the connection keeps the clientInfo the client sent, each string cut to 256 bytes on a character boundary. A client that joins a session copies that info into its member record.
A session keeps one flag for a change in its clients. The list is sent after each change, from the audience unlock, to every client that lists sh.fx/sessionClients, with each client's id, its clientInfo, and whether it is the main client. A joiner gets the list before its load answer, and the opener gets it after its session/new answer. A client whose write fails is dropped and the list goes out again without it.
A prompt or steer chunk that fx sends to the other clients carries the sender's id as sh.fx/client in its _meta, to each client that lists sh.fx/sessionClients. The other clients get the chunk as before. A steer group names each steer's own sender, and the running copy keeps the same version for a client that joins later. A client that resumes a session gets the list before its answer, as a load does.
A prompt or steer chunk is built once for each kind of receiver present: listing or not, and for a steer with or without sh.fx/steerInput. When every member lists the capability, one version is built. The running copy keeps the chunk's inputs once, and a joiner's replay builds the version its client takes, so an image is held as its raw bytes and not as a base64 copy per version.
The spec now says that fx sends the list only to clients that list sh.fx/sessionClients, what each entry holds, when the list is sent, and which chunks carry the sender's id. The model header states that the client list is built.
A driver runs fx acp through six plans in which the clients of one session open it, join it, leave it, and send prompts and steers, and checks what fx wrote against the shared session model through a trace module. The plans cover the list after session/new and after a load, a client that does not list the capability, a client that leaves, the main client leaving, and the sender named on prompt and steer chunks.
The initialize answer carried sh.fx/clientId to every client. A client that lists no sh.fx capability now gets an answer with only ACP v1 names, as the rule for sh.fx keys requires. The E2E helper that reads the id checks that a non-listing client gets none.
@fazxes fazxes added the type: feature Adds a new user-facing capability label Nov 25, 2026
…me in the shared-session driver

A client that does not list sh.fx/sessionClients has no sh.fx/clientId, so the driver could not name its entries in the client lists. It now sends each client a clientInfo name and matches a list entry by that name, then records the entry's id for the chunks the client sends.

This branch has not been deployed

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

Labels

type: feature Adds a new user-facing capability

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant