Skip to content

feat(agent): add rooms with session mentions and replies - #6925

Merged
M4n5ter merged 4 commits into
rust-previewfrom
codex/session-rooms
Nov 15, 2026
Merged

M4n5ter merged 4 commits into
rust-previewfrom
codex/session-rooms

Conversation

@M4n5ter

@M4n5ter M4n5ter commented Nov 15, 2026 •

Copy link
Copy Markdown
Member

Summary

Add an independent Rooms workspace for humans and agents to talk in one shared transcript. Ordinary conversations keep their own history, model loop and draft; a Room never starts a model loop.

SessionSend handles both destinations. Room posts accept structured mentions (Agent session IDs) and replyTo (a message in that Room). The post and admitted target queues commit together, each mention returns its own receipt, and the existing steering/queue path wakes the target. Author identity comes from the caller scope. Incoming Room messages give the agent the return address for replying with the same tool; final answers are not automatically echoed into the Room.

The ordinary sidebar reveals the Conversations/Rooms switch under a small Show more action below its five primary destinations. Rooms keeps that switch directly beneath New room. Rooms can be created, renamed and deleted; right-click menus provide Room actions and reply/copy on messages, with a reply shortcut appearing on hover or keyboard focus. Conversation and child-session menus use NSH ContextMenu at the pointer and Menu at the ellipsis, sharing their action items. The UI also provides a session picker, reply quotes and removable mention chips. Both editors retain their drafts, including attachments and reply metadata. Room history uses indexed message cursors and the existing subscription mechanism; images and local file previews reuse the existing viewers. There is no legacy compatibility path or separate Room-send tool.

Verification

The PR's original test additions and extensions were removed and rebuilt as five behavior tests, using the existing Host, provider and native UI fixtures:

  • room_interrupted_send_delivers_each_recipient_once_after_reopen: lose the caller after a committed post, recover the durable receipt, and reopen the Host. Two recipients receive the original text/image once; a duplicate mention does not deliver twice, an unavailable target has its own rejection, and the Room starts no model Run.
  • room_history_pages_and_read_position_survive_new_posts_and_reopen: post across a history page boundary, add a reply while reading, and verify frozen pagination has no loss/duplication/reordering. Reading the old tail leaves the new post unread; the latest read position survives reopening.
  • room_recovered_send_preserves_its_mentions_and_the_newer_draft: close and reopen the client journal with a send in flight. Its frozen mention/reply metadata survives, and completing that send preserves the newer draft.
  • desktop_room_reply_wakes_an_agent_without_mixing_drafts: create a Room through the native UI, post, reply from the message context menu, type @, choose an agent, reopen the window and Room, then send. The provider receives the quoted message and Room return address, its SessionSend reply is readable in the Room, and the ordinary conversation's unsent draft remains separate.
  • desktop_context_menus_follow_the_pointer_and_manage_rooms: right-click the same row at two positions, dismiss with Escape, rename a conversation, and rename/cancel deletion/delete a Room through the actual menus.

All five passed locally after integrating rust-preview at 5eb3cad8c. Two temporary negative controls also failed at their behavior assertions: removing mention deduplication caused duplicate delivery receipts, and dropping reply metadata from draft reads lost the restored reply target. Both mutations were restored before the final passing runs. Fresh native UI declarations and strict TypeScript, formatting, staged ASF headers, Biome on the resolved UI file and diff checks passed; the existing CI suite routing includes both new native UI cases and the native/client tests.

The feature's earlier validation also passed strict native TypeScript, SDK declaration generation, changed-TypeScript Biome checks, debug CLI/desktop builds, and focused workbench, ACP and native regressions. This test rewrite changes no product behavior.

Live macOS validation: used an isolated Root and a real Responses provider with codex/gpt-6.1-sol. A human posted, @ woke the first session, its SessionSend reply appeared in the Room, a human reply continued the same thread, and that agent then @ mentioned a second session which replied back. After restarting the built app, Room history, reply/mention draft and the ordinary conversation draft were still present. The latest navigation/menu follow-up was also exercised through real macOS mouse and keyboard input in a separate isolated Root: ordinary and Room context menus, prose Copy/Reply, rename, delete cancellation, and reply/mention draft preservation across mode changes. The screenshots below are unedited captures of that follow-up UI test; its two selectable sessions have no model configured and the shown reply remains an unsent draft.

The earlier strict native Clippy run stopped at 11 existing diagnostics in untouched files (including the Claude/Codex executors, driver tests and history projection); the full workspace and other desktop platforms were not run.

Migration

Existing client journals need the new draft columns before opening this build. Stop Maka for that Root, then run the one-time Python migration:

python3 migrate_room_drafts.py --root ~/.maka/application/host

The script preserves drafts, uploads and operation receipts, is safe to rerun, and creates no backups. It was tested against an old-schema journal including a pending send. Fresh Roots need no script. The canonical Room tables use the normal SQL migration.

Standard product installations receive the new Room UI binding through the existing baseline update. Explicit/custom flat deployments that supply the entire workbench configuration must add rooms: { path: ["conversations-ui"], id: "rooms" }, using their conversations instance path. No frozen application source or hash is rewritten by the migration script.

Screenshots

Room mode keeps the Conversations/Rooms switch directly below New room. Reply quotes and selected session mentions stay in the draft:

Room navigation with a reply and mention draft

Right-clicking the message prose opens the reply/copy menu at the pointer:

Message context menu

Room rename/delete actions are in the row context menu and the header ellipsis:

Room management context menu

Ordinary navigation reveals the mode switch under Show more; conversation actions also follow the right-click position:

Ordinary conversation context menu

AI use

  • No generative tool made a substantive contribution
  • Generative tooling made a substantive contribution

Codex implemented the contracts, persistence, delivery, native UI, tests and migration script, and performed the local/live validation. The commit carries Generated-by: Codex.

Checklist

  • Tests cover the change and fail without it
  • Format, typecheck and the affected suites pass locally

Does this PR entail a change in behavior?

  • Yes — described under Summary above
  • No

@M4n5ter
M4n5ter merged commit 8b1f05a into rust-preview Nov 15, 2026
1 check passed
@M4n5ter
M4n5ter deleted the codex/session-rooms branch November 15, 2026 12:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant