The ultimate harness for coding agents and beyond. All your agents. All your machines. One command center. Start with code, then follow your curiosity and build across disciplines: CAD, circuits, robots, games and music.
Round dial: a Swarm is its chats, not its work
Status: spec · 2026-10-28 · owner Diego · changes the Swarm tab of 2026-10-23-round-swarm-tab-design.md (§4 face, §5 alerts, §6 talk)
Why
Today the dial's Swarm tab follows the work:
- A project's Lead face reads
workwhenever any agent of the project is in a turn here, or any group isworkingorreview(cli/src/superTabs/cards.tsleadsOf). While it readswork, the face shows the working pet and clock and hides the recap (ui_habitat.crender_swarm_face). - The dial alerts when a project turns
askorstuck, which a group causes (needs_humanorblocked) (supertab.clead events →swarm_notice_raise). A new message from the Lead alerts nothing. - The recap is always the Lead's last message in the project's Lead conversation, and talking posts there, whatever the desktop has open.
The owner wants the dial to follow the conversation. Each project has three places to chat:
- Chat with PM (the person's private chat with the project's Lead);
- the Lead conversation (
# project); - one chat per group.
The dial should show the one the person is in, and speak up only when the Lead or the PM says something new.
What the owner decided (2026-10-28)
- A horizontal swipe on the dial moves between projects, as today. A project opens on its Lead chat.
- When the person opens that project's Chat with PM or one of its groups on the desktop, the dial follows to that chat.
- The face shows only the recap of the chat's last message from the agent side (the Lead, the PM, or an agent of the group). The person's own messages are not the recap.
- Working shows only for a group chat whose group is
working. Lead and PM chats never show working. - The dial alerts only when the Lead or the PM posts a new message (Lead conversation or Chat with PM). Groups never alert, whatever their state.
- A question asked by the Lead's own terminal on this machine (the existing Super Tab wait, a
questionframe withsuperTab) still alerts, as today. - Talking on the dial posts into the chat on the face.
- Round dial only. The Harness Pro keeps its current Swarm cards.
Approach chosen: the daemon decides, the firmware draws (A). The rules live in the CLI, so changing them later needs a CLI release, not a firmware flash.
Design
1. Desktop: say which chat is open
desktop/lib/state/app_state.dart_announceOpenPanesToDial: a Swarm tab's row inapp_swarmsgainsconversationId. It is the Swarm controller'sselectedIdwhen that id is a conversation in its snapshot (Lead conversation, Chat with PM or a group). Otherwise it is left out (a decisions view, a machine, not loaded yet).- A change of the selected conversation re-announces, as a change of the project does since #1911.
cli/src/localWsServer.tsappSwarmsFromaccepts it with the same id check asprojectId.cli/src/cable/cableHost.tsactiveSwarmProject()returns it.
2. Daemon: one chat per project, chosen and read here
The new rules apply only to a device whose hello carries swarmChat: "v1" (cableSession.ts hello parsing,
beside superTab: "wait-v1"). Every other device, the Pro and round firmware up to 0.0.94, keeps today's frames.
The chat on a project's face (cli/src/superTabs/cards.ts):
- If the window's active tab is this Swarm and its
conversationIdbelongs to this project, it is that conversation. - Otherwise it is the project's Lead conversation (
project.leadConversationId).
Its kind:
lead: the project's Lead conversation;pm: a conversation withaudience(the reader's private chat) in this project;group: any other conversation of the project.
The supertab frame, per Lead (one per project, as today), for a swarmChat device:
chat:lead|pm|group.chatId: the conversation id.chatName: "Lead", "PM", or the group's title, cut to 48 bytes likeproject.state:workonly whenchatisgroupand that group'sassignment.statusisworking. Otherwisedone. It is neveraskorstuck, so group states raise nothing on the device.sinceis sent only withwork, from the group agent's live turn here when there is one.
Recap:
supertab.recap.get {tab, lead}answers with the last message of the chat on that Lead's face whose author is an agent and whosesourceis null (system rows such as "Routed to…" are not recaps).lastLeadMessagebecomeslastAgentMessage(messages, agentIds), whereagentIdsis the Lead forlead/pmand the group'sagentIdsforgroup.- The
supertab.recapframe gainschatId. A recap for another chat than the one on the face is dropped by the device, as a recap for another Lead is today. - When the chat on the face changes (the desktop opened another one), the daemon sends the new
supertaband, for a device that has that Lead's recap open, the new recap.
Alerts (new frame supertab.notice):
- For each project of each Swarm, the daemon watches two conversations: the Lead conversation and the reader's Chat
with PM. It uses
lastMessageSequencefrom the tab reads it already makes every 5 s (SwarmCards). - When one moves, it reads that conversation's newest page once. That is the same read and the same 2-at-once limit
as recaps (
MAX_RECAPS_IN_FLIGHT). - For each new message after the last one seen whose author is that project's Lead agent and whose
sourceis null, it sendssupertab.notice {tab, lead, chat: "lead"|"pm", chatId, id, text, at}once.idis the message id, andtextis cut to the recap's length. - Baseline: the first read of a conversation after the daemon starts, or after a device attaches, records the last sequence and alerts nothing. Old messages never alert.
- Read on the desktop: when the window's
conversationIdis a conversation with an open alert, the daemon sendssupertab.notice.read {tab, lead, chatId}. - Groups are never watched for alerts.
Talk: say(harnessId, text) posts into the chat on that Lead's face (message.send to chatId) instead of
always the Lead conversation. A remote Lead still has no talk (today's rule).
3. Firmware (round): draw the chat, alert on its notice
- Hello: add
swarmChat: "v1"(cable_client.c, besidesuperTab: "wait-v1"). - Parse:
handle_supertabreadschat,chatIdandchatNameintoht_lead_t(supertab.h;chat_namesized likeproject).handle_supertab_recapreadschatId. New handlers parsesupertab.noticeandsupertab.notice.read. - Face (
render_swarm_face):- The upper arc shows the project, as today. The chat name is shown under it when the chat is not
lead. - The recap always shows when loaded. The working pet and clock show only for
state == work, which only a group chat can be. - The asking pose comes only from an open Lead wait (decision 6). The firmware no longer draws it from
ask/stuckfor aswarmChatdaemon; those states are not sent anyway.
- The upper arc shows the project, as today. The chat name is shown under it when the chat is not
- Alerts:
- A
supertab.noticeraises that Lead's inbox entry, which stays one per Lead (today'sswarm_notice_raise). The body is the message text, the green line is engine + project, the grey line is the Swarm name plus "PM" whenchatispm. - It beeps and wakes the display with the existing coalescing (one beep per 30 s).
- The entry is read at once only when the face shows that Lead and the face's
chatIdequals the notice's. Otherwise it stays unread. supertab.notice.readremoves it.- A later notice for the same Lead replaces the text and counts as unread again.
- A
- Lead waits (decision 6): unchanged. The
questionframe withsuperTabfor a Lead'slocalsets the wait text and raises the entry. With aswarmChatdaemon the Lead never readsask, soui_supertab_wait_closeremoves the entry instead of reverting it to the fixed text. - Following: unchanged (
supertab.focuspicks the project). The chat comes with the nextsupertab.
4. What does not change
- TABS, the tab list and the entry into a Swarm (#1891, #1911).
- The swipe between projects, and PANES.
supertab.select,supertab.openand the echo suppression.- The Pro: it never says
swarmChat, so it gets today's frames.
Design (docs/feature-design-rules.md)
Reviewed revision: ______ Reviewer (another engine): ______
- Growth:
- The daemon's alert baseline is in memory: one sequence per watched conversation, at most 16 Swarms × 12 projects × 2 conversations.
- Entries are deleted when a Swarm or project leaves the cards, and the whole map when the account changes or the daemon stops.
- The device keeps one inbox entry per Lead, as today. [x]
- Concurrency:
- Alerts and recaps are computed on the cable session's queue (
queued), one at a time per device. - The baseline map has one writer, the cards refresh. Two moves seen in one refresh produce one read. [x]
- Alerts and recaps are computed on the cable session's queue (
- Read cost:
- No new periodic read: sequences come from the 5 s tab reads that already run.
- A message page is read only when a watched sequence moved, capped at 2 at once.
- The frames grow by about 70 bytes per Lead, under the 512-token guard for 12 Leads (test). [x]
- Scale: at 10× messages from Leads, reads grow with messages, still capped at 2 at once and by the 5 s tab cadence. The first warning is the existing "too many recap reads at once" log line. [x]
- Compatibility:
- Gated on
swarmChat: "v1": old firmware and the Pro get today's frames. - New firmware with an old CLI gets today's frames and behaves as today.
- A desktop without
conversationIdgives the Lead chat always. - Existing readers of
supertab/supertab.recap:cable_client.c,cableSession.ts,superTabs/inCore/cards.ts(validationSTATES), and the Pro firmware, which is not gated in. [x]
- Gated on
- Migration and rollback:
- Order: CLI, then Desktop, then firmware. Each is safe alone.
- Rolling back the CLI returns every device to today's frames.
- Rolling back the firmware (0.0.94) just stops saying
swarmChat. [x]
- Audience:
- Chat with PM is private. The daemon reads as the signed-in person, and the backend returns only that person's
private chats (
visibleState). - The recap and the alert of a PM chat go only to that person's own dial: the daemon owns the USB device only for
the console user (
usbConsoleUser.ts), never the Team account. [x]
- Chat with PM is private. The daemon reads as the signed-in person, and the backend returns only that person's
private chats (
- Identity: reads and the talk post run as the signed-in person (
backend(this.core, …)), as today. [x] - Failure:
- A failed page read is logged once and retried when the sequence moves again.
- A failed recap leaves "…" and the device asks again (today's 5 s retry).
- Nothing alerts twice: the baseline only advances past messages it has sent or skipped. [x]
- Platforms: the round dial on macOS, Linux and Windows daemons alike. No platform-specific code. [x]
Testing
- CLI (
cards.spec.ts,cableSession.spec.ts,localWsServerspec):conversationIdparsing.- The chat on the face: default Lead, follows a PM chat or group of the same project, ignores one of another project.
- Kind detection for
lead,pmandgroup. stateisworkonly for a working group, and neverask/stuckfor aswarmChatdevice.- Recap is the last agent message of the chat and skips the person's messages and
sourcerows. - Alerts:
- one alert per new Lead or PM message;
- none for a group message, for the person's own message or for a system row;
- none for messages before the baseline;
notice.readwhen the desktop opens the chat.
- Talk posts to the face's
chatId. - A device without
swarmChatgets byte-identical frames to today.
- Desktop (
super_tab_dial_test.dart): opening a PM chat or a group re-announces with itsconversationId; opening a decisions view leaves it out. - Firmware host tests (
test_cable_supertab.py,test_touch_ui.py):- parse of the new fields and frames;
- the face with a PM chat (chat name, recap, no working);
- a working group (working pet), and a done group (recap);
- a notice for another chat stays unread, one for the face's chat is read at once;
notice.readremoves it;- no alert from
ask/stuck; - a Lead wait still alerts;
make device-test.
- On Diego's round (dev build 0.0.99, flashed with Diego's yes):
- Swipe between projects: each opens on its Lead.
- Open Chat with PM, then a group, on the desktop: the dial follows.
- A working group shows working; the Lead chat never does.
- A new PM message alerts once; a group message does not.
Unverified
That the messages page of a Chat with PM names the Lead asChecked 2026-10-28:author.idin the same shape as the Lead conversation.author: {kind: 'agent', id: <Lead agent id>},source: null, as in the Lead conversation.- Group titles can be long. Check how the 48-byte
chatNamelooks under the project on the arc with a mockup indevices/harness-device/mockup/before the firmware task.