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
chatd: let a chat message its parent and siblings in the family #247
Part of moving the pstack lead ("Pstack General", Xum workspace 8ac7791132) to a Coder Agents chat on this fork.
Gap
A chat can message only its direct children (message_agent, coderd/x/chatd/subagent.go:74). A child reaches its parent only by ending its turn, and it cannot reach a sibling at all.
The lead's whole operating model in Xum is messages between long-lived peers. Counts from the Xum transcripts, 2026-11-08 to 2026-11-12:
Workspace
task_send_message calls
Peer messages received
Lead
1236
2444
Fork ops
1599
2602
W6 plugin packs
366 (278 to ops, 73 to the lead)
Two flows have no Coder Agents equivalent today:
A workstream reports READY, a slot request or a blocker to the lead and keeps working. In Coder Agents it must end its turn, and wait_for_events reports only "done".
A workstream talks to ops directly for a validation slot or a UAT run (278 sends from W6 alone). As siblings under one lead they cannot, so the lead would relay every message.
Wanted
A tool for any chat in a family to send a message to its parent, a sibling or another family member by chat ID.
The message wakes an idle recipient and queues for a busy one, the same way message_agent treats a busy child.
The recipient sees who sent it (chat ID and title), marked as an agent message and not as the user.
The conversation shows the call as a card, and the recipient's chat shows the message with its sender.
Rate limits per chat, like notify_user has.
Acceptance
Child A sends to sibling B while B is idle, and B runs a turn with the message and A's ID.
A child sends to its parent mid-turn and continues, and the idle parent wakes.
Xum posted this comment on behalf of @ibetitsmike.
W14 status: PR 1 of 4 is open as #265 (message_family_chat behind fork-family-messages, head 24c507b). Next: PR 2 list_family_chats while #265 is in review, then the site tool card and recipient header after #265 merges.
Status: #265 (message_family_chat) is READY at d589b93.
chatd.chat_family_messages now has organization_id (NOT NULL, references organizations, ON DELETE CASCADE), copied from the sender chat. The rate-limit index is (sender_chat_id, organization_id, created_at).
fork-ci 9/9 green (run 43415145608), Codex clean on the head, 0 unresolved threads.
UAT round 2 passed 5/5 on ac48997: sibling message, a child waking its idle parent, refusal outside the family, the 60 per hour limit, and the tool hidden with the experiment off. Every recorded row had the sender chat's organization. The head then merged main; the only difference from the tested diff is the generated Experiment enum list.
Next: #266 (list_family_chats) gets #265 merged in and goes through the same checks.
W14 status: READY sent to the lead for #273 (c110e0a, fork-ci 43441690194, Codex OK) and #274 (719c59e, fork-ci 43442696693, Codex OK). The UI UAT on :3100 is pending and will be run by ops.
#273 merged as b98d50d. #274 now merges main at 4118393 (merge commit, no force-push). The only conflict was the add/add in site/src/testHelpers/forkFamilyMessages.ts, resolved by keeping both PRs' exports. UAT passed on both exact heads (c110e0a and 719c59e). fork-ci and Codex are pending on the new head.
READY #2744118393 (merge of main b98d50d into 719c59e, tree 243f89d8eb). fork-ci run 43448037472 succeeded (9/9 checks). Codex OK receipt 6856778724 on this head, 0 unresolved threads. UAT passed on 719c59e (fork ops verdict sha1 bb9409e4f1). Apart from the helper merge, the diff against 719c59e matches the #273 squash.
Mike's fork server autodeployed fork-main-2bf9127b59 (all four PRs) at 2026-11-13 16:38 local, and it passed the health check (v2.39.1-devel+2bf9127b59).
Known limits and possible follow-ups, not done here:
The copy button, message editing, the queued-message preview and the composer's prompt history still use the raw <agent-message> envelope text (feat(site/src): show a family message with its sender #274). Prompt history can resend the envelope as a user message.
Activity
ibetitsmike commentedon Nov 12, 2026
Tracked in #255.
ibetitsmike commentedon Nov 13, 2026
W14 status: PR 1 of 4 is open as #265 (
message_family_chatbehindfork-family-messages, head 24c507b). Next: PR 2list_family_chatswhile #265 is in review, then the site tool card and recipient header after #265 merges.fix(coderd): harden message_family_chat delivery
fix(coderd): close message_family_chat review gaps
fix(coderd/database/forkdb): keep the family list predicate indexable
ibetitsmike commentedon Nov 13, 2026
#265 is ready to merge at d4a21e5: fork-ci green, clean Codex review, dev-build UAT passed for all three acceptance items.
fix(coderd/x/chatd): keep list_family_chats within the tool-result bu…
fix(coderd): scope chat_family_messages to an organization
ibetitsmike commentedon Nov 13, 2026
Status: #265 (
message_family_chat) is READY at d589b93.chatd.chat_family_messagesnow hasorganization_id(NOT NULL, references organizations, ON DELETE CASCADE), copied from the sender chat. The rate-limit index is(sender_chat_id, organization_id, created_at).Next: #266 (
list_family_chats) gets #265 merged in and goes through the same checks.feat: add the message_family_chat tool behind fork-family-messages (#265
ibetitsmike commentedon Nov 13, 2026
Status: #266 (
list_family_chats) is READY at9ef2d69346c3cdbbafa45b4b96e36ed69e881dd4.9ef2d69346(comment), with 0 unresolved threads.044995538c(docs(coderd/x/chatd): describe fork features in ARCHITECTURE.md #272). ItsARCHITECTURE.mddiff is one bullet describinglist_family_chats.feat(coderd): add the list_family_chats tool behind fork-family-messa…
ibetitsmike commentedon Nov 13, 2026
W14 status: opened #273 (PR 3 of 4, the tool cards for
message_family_chatandlist_family_chats) at f3d06bb.ibetitsmike commentedon Nov 13, 2026
W14 status: opened #274 (PR 4 of 4, which shows a delivered family message with its sender in the recipient chat) at 1ac8de0.
ibetitsmike commentedon Nov 13, 2026
W14 status: READY sent to the lead for #273 (c110e0a, fork-ci 43441690194, Codex OK) and #274 (719c59e, fork-ci 43442696693, Codex OK). The UI UAT on :3100 is pending and will be run by ops.
ibetitsmike commentedon Nov 13, 2026
#273 merged as b98d50d. #274 now merges main at 4118393 (merge commit, no force-push). The only conflict was the add/add in
site/src/testHelpers/forkFamilyMessages.ts, resolved by keeping both PRs' exports. UAT passed on both exact heads (c110e0a and 719c59e). fork-ci and Codex are pending on the new head.ibetitsmike commentedon Nov 13, 2026
READY #274 4118393 (merge of main b98d50d into 719c59e, tree 243f89d8eb). fork-ci run 43448037472 succeeded (9/9 checks). Codex OK receipt 6856778724 on this head, 0 unresolved threads. UAT passed on 719c59e (fork ops verdict sha1 bb9409e4f1). Apart from the helper merge, the diff against 719c59e matches the #273 squash.
ibetitsmike commentedon Nov 13, 2026
All four PRs for this issue are merged into
mainbehind thefork-family-messagesexperiment:message_family_chattool: a chat can message its parent and siblingslist_family_chatstool: a chat can list its familyMike's fork server autodeployed
fork-main-2bf9127b59(all four PRs) at 2026-11-13 16:38 local, and it passed the health check (v2.39.1-devel+2bf9127b59).Known limits and possible follow-ups, not done here:
wait_agentgets a family message only afterwait_agentreturns (feat: add the message_family_chat tool behind fork-family-messages #265).<agent-message>envelope text (feat(site/src): show a family message with its sender #274). Prompt history can resend the envelope as a user message.Closing as done.