Repository navigation
feat(server): anyone who can write to a shared thread answers its prompts, and who answered is kept - #600
Closed
Jacksondr5 wants to merge 16 commits into
Closed
feat(server): anyone who can write to a shared thread answers its prompts, and who answered is kept#600Jacksondr5 wants to merge 16 commits into
Jacksondr5 wants to merge 16 commits into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Jacksondr5
force-pushed
the
j5code/share-4c-prompts
branch
from
October 13, 2026 05:51
01302c6 to
aeb31ba
Compare
Jacksondr5
force-pushed
the
j5code/share-4c-prompts
branch
from
October 13, 2026 05:56
aeb31ba to
6b54f1e
Compare
Jacksondr5
force-pushed
the
j5code/share-4c-prompts
branch
from
October 13, 2026 06:15
6b54f1e to
6045144
Compare
Jacksondr5
force-pushed
the
j5code/share-4c-prompts
branch
from
October 13, 2026 06:19
6045144 to
e48e28e
Compare
Jacksondr5
force-pushed
the
j5code/share-4c-prompts
branch
from
October 13, 2026 06:21
e48e28e to
1626364
Compare
Jacksondr5
force-pushed
the
j5code/share-4c-prompts
branch
from
October 13, 2026 06:25
1626364 to
1fa38e2
Compare
This was referenced Oct 13, 2026
Jacksondr5
force-pushed
the
j5code/share-4c-prompts
branch
from
October 13, 2026 06:57
1fa38e2 to
71ee167
Compare
Jacksondr5
force-pushed
the
j5code/share-4c-prompts
branch
from
October 13, 2026 07:08
71ee167 to
93d4778
Compare
Jacksondr5
force-pushed
the
j5code/share-4c-prompts
branch
from
October 13, 2026 23:38
ccd8628 to
31450e5
Compare
Jacksondr5
force-pushed
the
j5code/share-4c-prompts
branch
from
October 13, 2026 23:45
31450e5 to
bf9cab3
Compare
…mpts, and who answered is kept Upstream records that a prompt was resolved and not by whom, and a Crew roster could be answered only by a member. In a shared conversation the person who answers an approval or a question is now recorded and served to anyone who can read the thread. A guest sees a Crew roster on a thread it can read, and with Collaborate approves or declines it as the Captain proposed it: a request that carries seats of its own is refused. The Captain's gate notice says who decided, only when its thread is shared. A Crew's request for a further seat, a seat's approval, stopping or archiving a Crew and the inbox stay with members. For an approval or a question the agent itself is not told who answered: upstream's adapters hand the provider a fixed answer. That gap against AC9 is Jackson's to rule on. Refs #533 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
From the review of the collaborate layers. Who is answering a prompt is written before upstream settles it, and was taken back only when upstream refused the answer. An answer interrupted while upstream had it left its row behind, so a prompt later settled another way could read as answered by someone whose answer never landed. The wrap in ws.ts now settles the row on any exit: kept when upstream accepted, taken back when it refused or was interrupted. FORK.md case 74 states what a member pays per command and which two of upstream's fields J5 reads by SQL, with the test that catches a reshape. Refs #533 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…he prompt, and a guest's roster shows no host paths From Bryant's review of the stack. Upstream answers "accepted" again for any command id it has already taken on a thread, whatever the command was. A guest could replay the id of an earlier message as an answer to a prompt and be recorded as the person who answered it, over a member who really had. Who answered is now kept only when upstream's own event log shows that the command settled that prompt; otherwise what was written for it is taken back, and a record is never replaced by a claim. Who answered is recorded on any thread that is or has been a shared conversation, so a prompt a member answers after the last guest has gone still says who answered. The roster reads a guest may make returned the project's folder, the host's worktree folders and branch names, and ran git for each preview. For a guest's connection the workspace options are left out, git is not asked, and a seat's worktree folder is replaced. Refs #533 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…th the next message Jackson ruled on what Bryant's review left for him (2026-10-13). An approval carries no words to put a name on, so the agent of a shared conversation was never told who approved or declined its commands. The note at the top of the next message a person sends now carries one line for the approvals answered since the agent was last told: a count per person, members included, naming no command. It uses the same block and the same carrier as the note about who can write, so one block carries both when both are due, and a carrier withdrawn before it runs means the next message carries the line. Only an answer that upstream's log shows settled a prompt is counted. The last note of a thread that stops being shared carries what is left, and a thread shared again starts afresh. A thread that was never shared costs nothing more. A guest approving a roster whatever access its seats have is unchanged, and the definition now says so. Sharing and shared conversations are recorded as not supported on mobile. Refs #533 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Jackson ruled on the inbox reply's first line (2026-10-13). A person's reply to an agent's ask reached the agent as "[Message from human:…]", an id and no name, while a message typed in a shared thread says who wrote it and where they stand. Once the server holds a name for the person, the reply's first line is "[Message from Jackson (human:…)]" in every thread, in the form the outside-agent header already uses for a name and an id. In a shared conversation it is "[Message from Jackson (member) (human:…)]", the author line of a typed message with the id after it, and the first note tells the agent so. With no name on record the line is what it was. The envelope version moves to 27. The web card that parses this header is not changed here. Refs #533 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…m writes A live run on Claude found that no one was recorded as answering a question in a shared thread, though the answer reached the agent. The check that an answer really settled a prompt read a table upstream no longer writes to, so it never found the settling event and took every record back. It now reads upstream's live event log: the thread's stream, the event whose payload is the request, and the id of the command that caused it. The approvals line depends on the same check and was equally affected. The unit tests wrote that event by hand into the wrong table, which is why they passed. They now write it as upstream's event store does, and the test over the real orchestrator pins the table, the stream, the payload's id and the command id on an event upstream writes there. Refs #533 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… the first note A guest's first act on a shared thread can be answering an approval. The first note marked every waiting approval as told without telling it, so that one was never reported. That rule was meant for approvals answered while a thread was not shared; those are now closed when they are recorded, and the first note carries what was answered since the thread was shared. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…old it, and who answered from upstream's log What the agent was last told about who can write was kept in one row per thread with a one-level fallback. A rewind left the agent untold for good, since a rolled-back run counted as delivered, and a change note built on a first note that was then withdrawn stood in for it. Each carrier now keeps what it told and which carrier it was worked out against, on the message's author record. The agent was last told by the newest carrier that reached it along with every note it builds on. A rolled-back run counts as lost, for notes and for approvals told. The told table and its fallback are gone. Who answered a prompt is now the claim whose command upstream's event log shows settled it, read when asked. The accepted and refused steps, the settled column and the call after upstream's handler in ws.ts are gone, and a claim that lost is never returned. The event type is typed against upstream's union. Migrations 39 and 40 are edited in place: a test home made on an earlier commit of this stack must be rebuilt. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…queued note is not yet told A guest chose its own command id, and upstream replays any id it holds a receipt for on the thread as success. So a guest could name the id the platform would use to withdraw its queued message, and keep that message queued after losing access; or name an id upstream's recovery used, and be read as the one who answered a prompt. A guest's command now goes on under an id inside a space that is that person's alone, made from the client's id, so a retry still finds its own receipt. The platform's withdrawal carries a random part and logs if the run is still queued afterwards. A note on a message still in the queue has told the agent nothing, and its author can withdraw it: until a message that carries the note is known to have run, every message carries it. This replaces the chain of carriers. A guest answers a question in words and any other prompt by a decision, never both, so an approval cannot be wedged. A guest is handed back a roster without host paths after answering it. Angle brackets in a name or a "here for" line cannot close the platform's note, and look-alike brackets around member or guest are read as plain ones. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ation from its first message A new thread's first message comes in upstream's launch request, not as a command, so it skipped the check every other message goes through: in a project a guest holds Collaborate on, the first message was stored as typed, with no note and no author line. The launch request is now wrapped in ws.ts beside the command request, and its first message is taken in the same way. The thread has no record yet at that point, so whether it will be shared is read from the project the launch names. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… that ended unstarted told the agent nothing Every answer a guest sent was written down as a claim, even one upstream refused, and each message to a shared conversation reads the thread's claims. A guest could grow both. A guest's answer or dismissal is now refused unless upstream has that prompt pending, so nothing is written for an answer that cannot land. A message whose run failed or was interrupted before it started counted as having reached the agent. It now counts as lost, as a withdrawn one does. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ays what stands Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…nt is not told who answered an approval Two rulings from Jackson's read of the stack (2026-10-13). A guest's message may carry what a member's composer adds: context records, a plan to build from and a title seed, on a message and on a queued edit. Attachments, and records that name one, stay refused until a guest can upload (#597). Another thread a message names must be one the guest can read, and a context kind beginning j5 is the platform's. The line telling the agent who answered its approvals is removed, with the columns and the query that existed for it. Who answered is still recorded and shown to people. Migration 40 is edited in place: rebuild test homes. Both ws.ts edits are recorded as approved. A thread grant still writes to the one agent it names and reads those beneath it (#534). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… to, and sets no title Upstream does not only read the plan a message names: it marks it completed on the plan's own thread. A guest who could read that thread could therefore complete a member's plan there. Naming a plan now takes Collaborate on its thread. A thread attached for the agent to read still takes only reading. A title seed became the title of an empty thread, at any length. It is left out of a guest's command again; upstream makes a title. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A guest's reduced configuration left out inlineMessageContext, so upstream's composer took the server for an old one and folded a mention into plain words: the context a guest may now send never arrived as records. The capability is told truthfully. It says nothing about the host; the attachment capabilities stay unsaid, since a guest's attachments are refused. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…onversation Upstream and the providers read a command from the first character of a message, which in a shared conversation was the author line, so no slash command worked there. A member's message whose first character that is not whitespace is a slash now goes on exactly as typed, with no author line and no note; a note that is due rides on the next stamped message. A guest's message is stamped whatever it begins with, so it reaches the agent as words. The same holds for a queued edit and a new thread's first message. The first note says so, and Shared conversations AC22 records the rule (Jackson, 2026-10-13). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Owner
Author
|
Closed unmerged, by Jackson's decision (2026-10-17). The product was redefined from first principles in #631 (People and access, and a reworked Shared conversations), which reverses most of this stack's guest restrictions. The parts that still apply (the author line and note, the launch wrap, the answer records, the cards and notices) will be carried into a single rebuild PR against the new definitions, after the next upstream advance. The branch is kept for reference. 🤖 Generated with Claude Code |
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
In a shared conversation any member or guest collaborator may answer the agent's prompts, the first answer settles one, and the settled prompt shows who answered. Nothing recorded who answered, and a Crew roster could be answered only by a member. Third of three server layers for #533.
What changed
j5_a2a_prompt_answer), on any thread that is or has been a shared conversation, so a prompt a member answers after the last guest has gone still says who answered. Each person's answer is written down as it is taken in, before upstream has it, as a claim. Who answered is read as the claim whose command upstream's own event log shows settled the prompt. Upstream answers "accepted" again for any command id it has already taken, so its saying so is not proof: a replayed id, a refused or interrupted answer and an answer that lost to an earlier one all name no one. Nothing runs after upstream's handler. The event type is typed against upstream's event union, so a rename there fails to compile.guestCommandId:command:j5:guest:<person>:<the client's id>). A guest chose its own id, and upstream takes any id it holds a receipt for as already done. A guest could therefore name the id the platform would use to withdraw its queued message and keep that message alive after losing access (the security review proved this), or name an id upstream's recovery used and be read as the one who answered. Under its own id a guest's retry still finds its own receipt, and no one else's id can be named. Upstream's web client does not read back the id it sent. The platform's withdrawal also carries a random part, and logs an error if the run is still queued afterwards. A member's ids are unchanged.previewCrewProposalleaves outworkspaceOptionsand does not ask git for worktrees, and both it andlistThreadRostersreplace a seat's worktree folder. The approval token is the same one a member's preview gives.j5.crews.previewProposalneeds View andj5.crews.resolveProposalneeds Collaborate on the Captain's thread. A request that carriesseatsof its own, even the same ones, is refused: changing a seat stays with members.j5.crews.listThreadRosters({ threadId }), beside J5's other client reads, for anyone who can read the thread. It is the one client read a guest may make: the list of every open proposal on the server, like the rest of those reads, stays refused to a guest.decided_by: Priya (guest). Any other Captain reads the notice as it was.The agent is not told who answered an approval (AC9, Jackson: "The providers dont provide a way for us to give the context, a queued message is terrible UX"). An earlier commit put a line on the next message a person sent, counting approvals per person; it is removed with the columns and the query that existed for it. Who answered is still recorded and shown to the people on the thread.
A guest's message carries what a member's composer adds (Jackson: "We shouldn't put restrictions on message content (other than the prompt injection guard you already have)"): context records and a plan to build from, on a message and on a queued edit. A title seed is left out. Three limits remain, none about what a guest may say:
j5is refused: the platform keeps those for its own.Still refused as not content: accept for the session or always, steer, restart, model choice, and the fields that would make a message someone else's. What the agent reads for a guest's context is pinned by a test against upstream's own projection.
A member's slash command goes on as typed (Shared conversations AC22, Jackson 2026-10-13). Upstream and the providers read a command from the first character of the stored text, which in a shared conversation is the author line, so until now no slash command worked there for anyone. Now a member's message whose first character that is not whitespace is
/goes on exactly as typed: no author line, no note, no author record. A note that is due rides on the next stamped message. A guest's message is stamped whatever it begins with. A member's own queued message edited into a command goes on as typed and stops being a recorded message; a guest's queued message stays the guest's and stays stamped, whoever edits it. A new thread started with a member's command goes on as typed. The first note gains: "Nor does a member's message that begins with a slash command; a guest's always has one."/compact(/compresson Cursor)/logout/goal …Not covered: a member's queued slash command edited back into ordinary words goes on unstamped, because nothing records who sent an unstamped message. It is a member's, and the agent reads it as not a guest's.
Crews are unchanged (Jackson, 2026-10-13; #534): a thread grant writes to the one agent it names and reads those beneath it, and a guest answers no prompt on a Crew seat's thread.
For a question, a person's answer carries their name on its words (#599). For a Crew roster the Captain is told by the
decided_byline.A person's reply from the inbox names them.
[Message from Jackson (human:…)]once a name is on record, in the form the outside-agent header uses for a name and an id;[Message from Jackson (member) (human:…)]in a shared conversation, which is the author line of a typed message with the id after it. The envelope version moves to 27. Messages already stored keep their old line. Mobile does not parse this header.A guest approves a roster whatever access its seats have (Jackson: "you invited someone to your server to talk to agents, you need to trust them"). Nothing is built for it; AC10 now says it plainly.
Mobile is not supported for sharing and shared conversations (Jackson). Recorded in D33; the follow-up is #609.
Not verified by a unit test: that a second connected client sees a prompt settle. The three events upstream emits are ordinary thread events on the thread's feed; the live test checks it.
Live testing
Report:
test-reports/j5code-share-4c-prompts.md, Run 5 (a peer agent, on an isolated test server; real turns on Claude Haiku and GPT Luna; a member and a guest in two browser tabs).Verdict: pass on
9b380f8aeafor what was exercised, after a fail on the commit before it. The earlier commit recorded no answerer at all: the check that a command settled a prompt read a table upstream no longer writes. It reads upstream's live event log now.[Answer from Priya (guest)] Concise checklistas the answer to its question.[Message from Jackson (member) (human:…)].From the earlier runs: the first answer settled the prompt in the other person's tab without a reload, and a late answer was refused with "Runtime request … is resolved."
Not exercised live by this run: the commits since it, the last of which removes the approvals line and lets a guest's message carry context; a focused live pass on those is to follow. The first puts an approval answered before the first message into the first note (the UI builder found it missing and has since confirmed the fix live). The second and third rebuild how who answered is read and when a note counts as told, and put a guest's commands under ids of their own. They have tests on the real orchestrator for the kept-alive queued message and the repeated first note, and unit tests for a rewind and the answerer takeover; a live pass on them is still to come. Also not exercised: a question prompt on Codex; a Crew roster decided by a guest, so the
decided_byline andlistThreadRostersare covered by tests only; a migration rehearsal from an older database; mobile and desktop. After the restart the first page load showed "No projects yet" with an HTTP 403 and recovered on the next navigation; the tester did not isolate it as a product defect.Upstream impact
apps/server/src/ws.ts, FORK.md case 75, gains a second wrapped request beside the one #598 added (5 lines; approved by Jackson, 2026-10-13):orchestration.launchThreadgoes throughadmitLaunch, because a new thread's first message comes in the launch request and not as a command. The call after upstream's handler that an earlier commit added is gone. FORK.md case 75 now lists every upstream field J5 reads by SQL and what a member's command costs. One change to what upstream receives: a guest's command id is rewritten, recorded in D33.J5 migrations 40 and 41 are edited in place (41 again for the removed approvals columns). The stack's migrations are 39 to 41, after #615's 38. A test home made on an earlier commit of this stack must be rebuilt.
Checklist
FORK.md(case text and file-table row) in this PRlistThreadRosters, which no client does yetClaude Opus 5.5, Claude Code in J5 Code.
🤖 Generated with Claude Code