The agent that grows with you
Python aiai-agentai-agentsanthropicchatgptclaudeclaude-codecodexhermeshermes-agentllmnous-researchopenai
fix(desktop): limit group choices to supported connections
Ehsan-hash72166e61969d
diff --git a/apps/desktop/src/plugins/hermes-bots/canonical-group-capability-gates.test.tsx b/apps/desktop/src/plugins/hermes-bots/canonical-group-capability-gates.test.tsxindex 67c5ba158e6..6c804b7dbb4 100644--- a/apps/desktop/src/plugins/hermes-bots/canonical-group-capability-gates.test.tsx+++ b/apps/desktop/src/plugins/hermes-bots/canonical-group-capability-gates.test.tsx@@ -1,6 +1,6 @@import type * as HermesSdk from '@hermes/plugin-sdk'import { host } from '@hermes/plugin-sdk'-import { act, cleanup, fireEvent, render, screen } from '@testing-library/react'+import { act, cleanup, fireEvent, render, screen, waitFor } from '@testing-library/react'import type { WritableAtom } from 'nanostores'import { afterEach, beforeEach, expect, it, vi } from 'vitest'@@ -13,6 +13,7 @@ import type * as GroupChatModule from './group-chat'import type * as GroupChatParts from './group-chat-parts'import { GroupChatWorkspace } from './group-chat-view'import { translateBots } from './i18n-test-helper'+import type { RosterRow } from './types'const { request, notify, openWorkspace, activation } = vi.hoisted(() => ({ request: vi.fn(), notify: vi.fn(), openWorkspace: vi.fn(), activation: { epoch: 1 } }))vi.mock('@hermes/plugin-sdk', async importOriginal => {@@ -58,7 +59,19 @@ const state = {gateway: host.state.gateway as WritableAtom<string>}-const roster = [{ name: 'alpha', connectionId: 'local' }, { name: 'beta', connectionId: 'local' }]+const roster: RosterRow[] = [{ name: 'alpha', connectionId: 'local' }, { name: 'beta', connectionId: 'local' }]++const mixedRoster: RosterRow[] = [+ ...roster,+ { name: 'remote', connectionId: 'other-box', connectionLabel: 'Other box', remoteSource: true },+ {+ name: 'spoofed',+ connectionId: 'local',+ remoteSource: true,+ route: { connectionId: 'other-box', mode: 'remote', profile: 'spoofed', targetProfile: 'spoofed' }+ }+]+const unavailable = CANONICAL_GROUP_LOCALES.en.driverUnavailable// Decision-relevant fields emitted by the actual canonical capabilities producer.@@ -119,8 +132,14 @@ async function submitDialog() {const onClose = vi.fn()render(<CreateGroupChatDialog onClose={onClose} onCreated={onCreated} open roster={roster} />)- for (const checkbox of screen.getAllByRole('checkbox')) {fireEvent.click(checkbox)}- await act(async () => { fireEvent.click(screen.getByRole('button', { name: 'Create Group (2)' })) })+ for (const checkbox of screen.getAllByRole('checkbox').slice(0, 3)) {fireEvent.click(checkbox)}+ await waitFor(() => expect(request.mock.calls.map(call => call[1])).toContain('groups.capabilities'))+ await act(async () => {})+ const submit = screen.getByRole('button', { name: 'Create Group (2)' }) as HTMLButtonElement++ if (!submit.disabled) {+ await act(async () => { fireEvent.click(submit) })+ }return { onCreated, onClose }}@@ -156,7 +175,9 @@ it.each(refused)('classifies %j as unavailable on both surfaces: no legacy rendecleanup()const { onCreated, onClose } = await submitDialog()- expect(notify).toHaveBeenCalledWith({ kind: 'error', message: unavailable })+ expect(screen.getByRole('status').textContent).toBe(unavailable)+ expect((screen.getByRole('button', { name: 'Create Group (2)' }) as HTMLButtonElement).disabled).toBe(true)+ expect(notify).not.toHaveBeenCalled()expect(onCreated).not.toHaveBeenCalled()expect(onClose).not.toHaveBeenCalled()expect(updateGroupChat).not.toHaveBeenCalled()@@ -181,6 +202,139 @@ it('keeps positive classifications working: legacy renders and creates locally,expect(request.mock.calls.filter(call => call[1] === 'groups.create')).toHaveLength(1)})+it('canonical creation offers only members on the current connection before submission', async () => {+ answer({ driver: true, persistent_process: true })+ const { baseElement } = render(<CreateGroupChatDialog onClose={vi.fn()} open roster={mixedRoster} />)++ expect(baseElement.querySelector('[data-bot-face="remote"]')).toBeNull()+ expect(baseElement.querySelector('[data-bot-face="spoofed"]')).toBeNull()+ await waitFor(() => {+ expect(request.mock.calls.map(call => call[1])).toContain('groups.capabilities')+ expect(baseElement.querySelector('[data-bot-face="alpha"]')).not.toBeNull()+ expect(baseElement.querySelector('[data-bot-face="beta"]')).not.toBeNull()+ })++ for (const checkbox of screen.getAllByRole('checkbox').slice(0, 2)) {fireEvent.click(checkbox)}+ const submit = screen.getByRole('button', { name: 'Create Group (2)' }) as HTMLButtonElement+ await waitFor(() => expect(submit.disabled).toBe(false))+ expect(baseElement.querySelector('[data-bot-face="remote"]')).toBeNull()+ expect(baseElement.querySelector('[data-bot-face="spoofed"]')).toBeNull()+})++it('rechecks the current mode before creating after a mixed legacy selection', async () => {+ let capabilityReads = 0+ const onCreated = vi.fn()+ const onClose = vi.fn()+ request.mockImplementation(async (_route, method, params) => {+ if (method === 'groups.capabilities') {+ capabilityReads += 1++ return capabilityReads === 1 ? legacy : { driver: true, persistent_process: true }+ }++ if (method === 'groups.create') {+ return { room: { room_id: params.room_id, name: params.name, members: params.members } }+ }++ throw new Error(`Unexpected RPC: ${method}`)+ })++ const { baseElement } = render(<CreateGroupChatDialog onClose={onClose} onCreated={onCreated} open roster={mixedRoster} />)+ await waitFor(() => expect(capabilityReads).toBe(1))+ await waitFor(() => {+ expect(baseElement.querySelector('[data-bot-face="remote"]')).not.toBeNull()+ expect(baseElement.querySelector('[data-bot-face="spoofed"]')).not.toBeNull()+ })++ for (const checkbox of screen.getAllByRole('checkbox').slice(0, 3)) {fireEvent.click(checkbox)}+ const submit = screen.getByRole('button', { name: 'Create Group (3)' })+ expect((submit as HTMLButtonElement).disabled).toBe(false)++ await act(async () => { fireEvent.click(submit) })+ await waitFor(() => expect(notify).toHaveBeenCalledWith({ kind: 'error', message: unavailable }))+ expect(request.mock.calls.filter(call => call[1] === 'groups.create')).toHaveLength(0)+ expect(onCreated).not.toHaveBeenCalled()+ expect(onClose).not.toHaveBeenCalled()+})++it.each(['profile', 'gateway', 'same-route-activation'] as const)('rejects a %s change queued after fresh capability validation', async kind => {+ let capabilityReads = 0+ const onCreated = vi.fn()+ const onClose = vi.fn()+ request.mockImplementation(async (_route, method, params) => {+ if (method === 'groups.capabilities') {+ capabilityReads += 1++ if (capabilityReads === 2) {+ queueMicrotask(() => queueMicrotask(() => queueMicrotask(() => queueMicrotask(() => moveSource(kind)))))+ }++ return { driver: true, persistent_process: true }+ }++ if (method === 'groups.create') {+ return { room: { room_id: params.room_id, name: params.name, members: params.members } }+ }++ throw new Error(`Unexpected RPC: ${method}`)+ })++ render(<CreateGroupChatDialog onClose={onClose} onCreated={onCreated} open roster={roster} />)+ await waitFor(() => expect(capabilityReads).toBe(1))++ for (const checkbox of screen.getAllByRole('checkbox').slice(0, 2)) {fireEvent.click(checkbox)}+ const submit = screen.getByRole('button', { name: 'Create Group (2)' })+ await waitFor(() => expect((submit as HTMLButtonElement).disabled).toBe(false))++ await act(async () => { fireEvent.click(submit) })+ await waitFor(() => expect(request.mock.calls.filter(call => call[1] === 'groups.create')).toHaveLength(0))+ await waitFor(() => expect(notify).toHaveBeenCalledWith({ kind: 'error', message: unavailable }))+ expect(request.mock.calls.filter(call => call[1] === 'groups.create')).toHaveLength(0)+ expect(updateGroupChat).not.toHaveBeenCalled()+ expect(onCreated).not.toHaveBeenCalled()+ expect(onClose).not.toHaveBeenCalled()+})++it.each(['profile', 'gateway', 'same-route-activation'] as const)('does not persist a legacy group after a %s change queued after fresh capability validation', async kind => {+ let capabilityReads = 0+ const onCreated = vi.fn()+ const onClose = vi.fn()+ request.mockImplementation(async (_route, method, params) => {+ if (method === 'groups.capabilities') {+ capabilityReads += 1++ if (capabilityReads === 2) {+ queueMicrotask(() => queueMicrotask(() => queueMicrotask(() => queueMicrotask(() => moveSource(kind)))))+ }++ return legacy+ }++ if (method === 'profiles.configure') {return {}}++ if (method === 'groups.create') {+ return { room: { room_id: params.room_id, name: params.name, members: params.members } }+ }++ throw new Error(`Unexpected RPC: ${method}`)+ })++ render(<CreateGroupChatDialog onClose={onClose} onCreated={onCreated} open roster={roster} />)+ await waitFor(() => expect(capabilityReads).toBe(1))++ for (const checkbox of screen.getAllByRole('checkbox').slice(0, 2)) {fireEvent.click(checkbox)}+ const submit = screen.getByRole('button', { name: 'Create Group (2)' })+ await waitFor(() => expect((submit as HTMLButtonElement).disabled).toBe(false))++ await act(async () => { fireEvent.click(submit) })+ await act(async () => {})+ expect(request.mock.calls.filter(call => call[1] === 'profiles.configure')).toHaveLength(0)+ expect(updateGroupChat).not.toHaveBeenCalled()+ expect(notify).toHaveBeenCalledWith({ kind: 'error', message: unavailable })+ expect(onCreated).not.toHaveBeenCalled()+ expect(onClose).not.toHaveBeenCalled()+})+function moveSource(kind: 'profile' | 'gateway' | 'same-route-activation') {if (kind === 'profile') {state.profile.set('other')}diff --git a/apps/desktop/src/plugins/hermes-bots/create-dialog.tsx b/apps/desktop/src/plugins/hermes-bots/create-dialog.tsxindex 4aa22fcfe5e..bae27341c4d 100644--- a/apps/desktop/src/plugins/hermes-bots/create-dialog.tsx+++ b/apps/desktop/src/plugins/hermes-bots/create-dialog.tsx@@ -20,6 +20,7 @@ import {DialogHeader,DialogTitle,DisclosureCaret,+ gatewayActivationEpoch,GlyphSpinner,host,Input,@@ -47,7 +48,8 @@ import { createCanonicalChat } from './canonical-chat'import { groupCreationSource, groupExecutionMode } from './canonical-group-capabilities'import { registerCanonicalGroup } from './canonical-group-registry'import type { CanonicalGroupOrigin } from './canonical-group-registry'-import { canonicalGroupRequest, captureCanonicalGroupRoute, createCanonicalGroup } from './canonical-groups'+import { canonicalGroupRequest, createCanonicalGroup } from './canonical-groups'+import type { CanonicalGroupRoute } from './canonical-groups'import { $botMeta, botHandle, botRosterKey, filterBots, ROSTER_KEY, saveBotMeta } from './data'import { labeled, ResizableFrame } from './dialog-parts'import { GROUP_CHAT_MAX_MEMBERS, mintGroupRoomId, uniqueGroupChatName, updateGroupChat } from './group-chat'@@ -1180,14 +1182,56 @@ interface CreateGroupChatDialogProps {roster: RosterRow[]}-/** Discord-style group chat creation: pick 2+ bots via checkboxes (with- * search), name the group, create. Assignment appends to each local bot's- * group membership list, so the room appears in the roster and syncs- * cross-machine via ui_meta without replacing its other groups. */+type GroupCapabilityState = {+ activationEpoch: number+ mode: ReturnType<typeof groupExecutionMode>+ source: string+}++async function revalidateGroupCreationMode(+ route: CanonicalGroupRoute,+ capability: GroupCapabilityState | null,+ source: string,+ unavailableMessage: string+) {+ const sourceCurrent = groupCreationSource(route, capability?.activationEpoch ?? -1)++ if (!capability || capability.source !== source || !sourceCurrent()) {+ throw new Error(unavailableMessage)+ }++ const mode = capability.mode++ if (mode !== 'canonical' && mode !== 'legacy') {+ throw new Error(unavailableMessage)+ }++ const freshMode = groupExecutionMode(await canonicalGroupRequest<unknown>(route, 'groups.capabilities'))++ if (!sourceCurrent() || freshMode !== mode) {+ throw new Error(unavailableMessage)+ }++ return { mode, sourceCurrent }+}++/** Discord-style group chat creation: pick 2+ routable bots via checkboxes+ * (with search), name the group, create. Legacy assignments append to each+ * local bot's group membership list and sync through ui_meta; canonical groups+ * keep members on their authority connection. */export function CreateGroupChatDialog({ open, roster, onClose, onCreated }: CreateGroupChatDialogProps) {const { t } = useI18n()const b = useBots()const allMeta: Record<string, BotMeta> = useValue($botMeta)+ const connectionId = useValue(host.state.connectionId)+ const profile = useValue(host.state.profile)+ const gateway = useValue(host.state.gateway)+ const activationEpoch = gatewayActivationEpoch()+ const source = JSON.stringify([connectionId, profile, gateway, activationEpoch])+ const observedRoute = connectionId ? { connectionId, profile } : null++ const [capability, setCapability] = useState<GroupCapabilityState | null>(null)+const [query, setQuery] = useState('')const [checked, setChecked] = useState<Record<string, boolean>>({})const [name, setName] = useState('')@@ -1203,9 +1247,67 @@ export function CreateGroupChatDialog({ open, roster, onClose, onCreated }: Crea}}, [open])+ useEffect(() => {+ let cancelled = false+ setCapability(null)++ if (!open || gateway !== 'open' || !connectionId) {+ return+ }++ const route = { connectionId, profile }+ const sourceCurrent = groupCreationSource(route, activationEpoch)++ void canonicalGroupRequest<unknown>(route, 'groups.capabilities')+ .then(result => {+ if (!cancelled && sourceCurrent()) {+ setCapability({+ activationEpoch,+ mode: groupExecutionMode(result),+ source+ })+ }+ })+ .catch(() => {+ if (!cancelled && sourceCurrent()) {+ setCapability({+ activationEpoch,+ mode: 'unavailable',+ source+ })+ }+ })++ return () => { cancelled = true }+ }, [activationEpoch, connectionId, gateway, open, profile, source])++ const mode = capability?.source === source ? capability.mode : 'checking'++ const currentConnection = String(connectionId || '').trim()++ const belongsToCurrentConnection = (bot: RosterRow) => {+ if (!currentConnection) {+ return false+ }++ if (bot.connectionId) {+ return bot.connectionId === currentConnection &&+ (!bot.route?.connectionId || bot.route.connectionId === currentConnection)+ }++ return !bot.remoteSource && (!bot.route?.connectionId || bot.route.connectionId === currentConnection)+ }+// An outage placeholder preserves one selected owner's identity in the// sidebar, but it is not a routable room member. Never offer it here.- const selectableRoster = roster.filter(bot => !bot?.ghost)+ const selectableRoster = roster.filter(bot => {+ if (bot?.ghost) {+ return false+ }++ return mode === 'legacy' || belongsToCurrentConnection(bot)+ })+const selected = selectableRoster.filter(bot => checked[botRosterKey(bot)])const visible: RosterRow[] = filterBots(selectableRoster, allMeta, query)const atCap = selected.length >= GROUP_CHAT_MAX_MEMBERS@@ -1214,7 +1316,8 @@ export function CreateGroupChatDialog({ open, roster, onClose, onCreated }: Crea? selected.map(bot => displayName(bot, botRosterMeta(bot, allMeta))).join(', '): b.group.nameLabel- const canCreate = selected.length >= 2 && Boolean(name.trim() || selected.length)+ const canCreate = selected.length >= 2 && Boolean(name.trim() || selected.length) &&+ (mode === 'canonical' || mode === 'legacy')const creating = useRef(false)@@ -1229,17 +1332,23 @@ export function CreateGroupChatDialog({ open, roster, onClose, onCreated }: Creareturn}- const route = captureCanonicalGroupRoute()- const sourceCurrent = groupCreationSource(route)+ const route = observedRoute++ if (!route) {+ throw new Error(b.canonical.driverUnavailable)+ }- const capabilities = await canonicalGroupRequest<unknown>(route, 'groups.capabilities')- const mode = groupExecutionMode(capabilities)+ const { mode: currentMode, sourceCurrent } = await revalidateGroupCreationMode(route, capability, source, b.canonical.driverUnavailable)- if (!sourceCurrent() || mode === 'unavailable') {+ if (!sourceCurrent()) {throw new Error(b.canonical.driverUnavailable)}- if (mode === 'canonical') {+ if (currentMode === 'canonical') {+ if (!sourceCurrent()) {+ throw new Error(b.canonical.driverUnavailable)+ }+const created = await createCanonicalGroup(route, base, durableGroupChatMembers(selected))// Creation already succeeded; leave it on its owner without adopting a stale result.@@ -1270,6 +1379,10 @@ export function CreateGroupChatDialog({ open, roster, onClose, onCreated }: Creaconst groupName = uniqueGroupChatName(base, taken)const roomId = mintGroupRoomId()+ if (!sourceCurrent()) {+ throw new Error(b.canonical.driverUnavailable)+ }+for (const bot of selected) {void saveBotMeta(bot, groupMembershipPatch(botRosterMeta(bot, allMeta), groupName, true))}@@ -1313,6 +1426,7 @@ export function CreateGroupChatDialog({ open, roster, onClose, onCreated }: Crea<DialogTitle>{b.group.newTitle}</DialogTitle><DialogDescription>{`Pick 2–${GROUP_CHAT_MAX_MEMBERS} bots. Local memberships sync through each Bot profile; cross-machine members stay scoped to this room.`}</DialogDescription></DialogHeader>+ {mode === 'unavailable' && <p role="status">{b.canonical.driverUnavailable}</p>}{/* TODO(bot-mode-types): this search box never takes focus when the dialogopens — SearchField accepts no `autoFocus` prop and forwards no extraprops, so the `autoFocus` that used to sit here was inert. */}diff --git a/apps/desktop/src/plugins/hermes-bots/roster-pane-dialogs.tsx b/apps/desktop/src/plugins/hermes-bots/roster-pane-dialogs.tsxindex 26a79a7af73..d0cc9a7e611 100644--- a/apps/desktop/src/plugins/hermes-bots/roster-pane-dialogs.tsx+++ b/apps/desktop/src/plugins/hermes-bots/roster-pane-dialogs.tsx@@ -68,8 +68,8 @@ export function renderRosterDialogs({<CreateGroupChatDialogonClose={() => setGroupCreateOpen(false)}onCreated={(group, origin) => openGroupChat(group, origin)}- open={groupCreateOpen} // Full multi-source roster: group chats can seat bots from other- // registered connections — their turns route to their own machines.+ open={groupCreateOpen} // The dialog applies the active gateway mode to+ // the full roster before allowing a group to be created.roster={roster}/><SectionNameDialogdiff --git a/apps/desktop/src/plugins/hermes-bots/roster-pane-toolbar.tsx b/apps/desktop/src/plugins/hermes-bots/roster-pane-toolbar.tsxindex 4f019c45817..13049a99835 100644--- a/apps/desktop/src/plugins/hermes-bots/roster-pane-toolbar.tsx+++ b/apps/desktop/src/plugins/hermes-bots/roster-pane-toolbar.tsx@@ -22,8 +22,8 @@ interface renderRosterToolbarProps {b: ReturnType<typeof useBots>activityToasts: booleanactiveSourceRoster: RosterRow[]- /** Full multi-source roster — the New Group Chat gate counts the same- * selectable set the dialog seats (bots from every registered connection). */+ /** Full roster used by the dialog. The dialog filters it by the active+ * gateway mode before offering seats. */roster: RosterRow[]setCreateOpen: (value: boolean) => voidsetGroupCreateOpen: (value: boolean) => void@@ -104,8 +104,7 @@ export function renderRosterToolbar({<Codicon className="mr-1.5" name="hubot" />{b.bot.newTitle}</DropdownMenuItem>- {/* Same selectable set as CreateGroupChatDialog: one local bot plus a- remote-connection bot is a valid room (#101543). */}+ {/* The dialog applies the gateway-mode member filter after it opens. */}<DropdownMenuItemdisabled={roster.filter(bot => !bot?.ghost).length < 2}onSelect={() => setGroupCreateOpen(true)}diff --git a/website/docs/user-guide/bot-mode.md b/website/docs/user-guide/bot-mode.mdindex 0cc50a5c60f..3170f64b9d8 100644--- a/website/docs/user-guide/bot-mode.md+++ b/website/docs/user-guide/bot-mode.md@@ -136,7 +136,7 @@ the error>` (secret-shaped tokens redacted, long lines truncated). Expand Activitry again. An ambiguous submit failure is not automatically resubmitted.-Right-click a local Bot → **Manage groups** to add or remove it from any number of group chats. Pick existing groups independently or create one inline. Local membership is stored in the Bot's backend-synced profile metadata, so it follows that profile across desktops; older profiles with one legacy group continue to work. Connections Bots join through the New Group Chat picker and remain source-qualified in the room's shared state.+Right-click a local Bot → **Manage groups** to add or remove it from any number of group chats. Pick existing groups independently or create one inline. Local membership is stored in the Bot's backend-synced profile metadata, so it follows that profile across desktops; older profiles with one legacy group continue to work. Connections Bots join through the New Group Chat picker and remain source-qualified in the room's shared state. Groups managed by one gateway offer only Bots on the active connection, while older Desktop rooms can retain mixed-connection members.To edit an existing room as a unit, use **Manage members** — from the room header's people icon or the **Manage members…** button in **Group settings**. The checklist pre-selects the current members and lists every local and Connections Bot; add or remove several at once and **Save members** applies the new roster (still 2–6 Bots) while the room, its history and each member's room session stay in place. A removed Bot takes no further turns; an added Bot reads the recent room history on its first turn. **Cancel** changes nothing.@@ -167,10 +167,10 @@ Use the **Move up** and **Move down** arrows beside a room to choose its positio- Hard caps (10 messages per send, 3 rounds) keep rooms from spinning.- Each member keeps its own persistent room session, so room context survives like any other conversation.- **Not every Bot replies to every message.** Speaking is each member's own choice — a Bot replies only when it has something new to add and passes otherwise, and @-mentioning specific members scopes the round to them. Expect the members you addressed (or whoever has something to say) to speak, and the rest to stay quiet.-- **Rooms keep running when you close the Desktop.** When every member of a room lives on the same gateway, that gateway owns turn scheduling through a durable driver: closing Hermes Desktop (or losing its connection) does not stop a room mid-discussion, and the Desktop simply catches up from the room's log when it reconnects. `groups.capabilities` on the gateway reports `driver: true` when this applies. More than one room worker may share a home — the host gateway that Desktop attaches to (`hermes gateway run`) and a `hermes serve` / `hermes dashboard` backend both run one — and whichever holds the room's driver lease runs the next turn; a member's room session is held only for the duration of its turn, so the lease can move between workers without a turn being refused. Room state lives in the install's root `shared-state.db`; installs that created rooms before that file existed (when rooms were still kept in the root `state.db`) get those rooms copied across once, on the first open after updating, so pre-existing Group Chats stay reachable. Rooms whose members span several machines are different: each member's turns run on its own gateway, and the cross-connection courier described under *Bot-to-bot messaging* still applies to them.+- **Rooms keep running when you close the Desktop.** When every member of a room lives on the same gateway, that gateway owns turn scheduling through a durable driver: closing Hermes Desktop (or losing its connection) does not stop a room mid-discussion, and the Desktop simply catches up from the room's log when it reconnects. `groups.capabilities` on the gateway reports `driver: true` when this applies. More than one room worker may share a home — the host gateway that Desktop attaches to (`hermes gateway run`) and a `hermes serve` / `hermes dashboard` backend both run one — and whichever holds the room's driver lease runs the next turn; a member's room session is held only for the duration of its turn, so the lease can move between workers without a turn being refused. Room state lives in the install's root `shared-state.db`; installs that created rooms before that file existed (when rooms were still kept in the root `state.db`) get those rooms copied across once, on the first open after updating, so pre-existing Group Chats stay reachable. Legacy rooms whose members span several machines are different: each member's turns run on its own gateway, and the cross-connection courier described under *Bot-to-bot messaging* applies to those rooms.- **Mentions read as identities.** In the transcript a routed `@bot` mention, the human handoff `@user`, and the broadcasts `@everyone` / `@all` render as inline references (accent text, not pills); unknown `@words` and e-mail addresses stay plain. Hover a Bot's message and use **Reply to @handle** to seed `@handle ` into the composer, so your next send goes to that Bot only (when a same-named Bot from a Connection shares the room, the tag is device-qualified, e.g. `@reviewer-mini` / `@reviewer-local`) — **Reply in thread** still continues the whole thread. If a reply box for a *different* thread is open, **Reply to** seeds the main composer instead and so starts a fresh thread; use **Reply in thread** to continue that thread.-- **Rooms can span machines.** **New Group Chat** is available as soon as two Bots are selectable across all your registered connections — one Bot on this device plus one on another gateway is enough. The picker seats Bots from any registered connection; each member's turns run on its own machine, in its own room session there. Cross-machine members carry a device badge (`dixie · Mac Mini`) in the room and in other members' transcripts, and the disambiguated `@name-device` handle works in room mentions — so same-named agents on two machines never blur together. A member's turn that outlives this Desktop — you quit or it crashed mid-turn — finishes on the member's own machine: the room posts that reply the next time it is driven, and does not re-drive the member while it is still working.+- **Rooms can span machines.** New Group Chat checks how the active gateway runs group rooms before offering members. Groups managed by one gateway offer only Bots on the active connection, so every selected member can be reached by that gateway. Older Desktop rooms retain mixed-connection selection; those members carry a device badge (`dixie · Mac Mini`) in the room and in other members' transcripts, and each member's turns run on its own machine and room session. A member's turn that outlives this Desktop, because you quit or it crashed mid-turn, finishes on the member's own machine: the room posts that reply the next time it is driven, and does not re-drive the member while it is still working.- **Rooms show the same identity as the roster.** Transcript rows, the “X is thinking…” line and Activity rows resolve each member's title and avatar by its owning connection and profile — re-titling a Bot or changing its picture updates every room it sits in, remote members keep their own titles, and two same-named Bots on different connections never borrow each other's avatar. When two members would still read identically, Activity appends the connection label (`Reviewer · Mac Mini`).- **Plugins can watch members work.** The durable room log records `turn.started` and `turn.settled`; what a member does in between (tools, approvals, streamed text) is projected to plugins through the [`on_room_member_activity`](./features/hooks.md#on_room_member_activity) hook with room, member and turn coordinates, so community clients can build tool cards and live member status on top of Group Chat without reading Hermes internals.- **What a member says outside the room still reaches it.** Each member's room session is an ordinary Hermes session (titled `Group: <room> · <thread>`), so you can resume it from the CLI, a routine can post into it, or the Bot's own tools can write to it. When you open the room, and again each time the room drives that member, whatever those writers added since the room last looked — your questions and the member's answers — is posted into the room log under that member's name, once, in the thread the session belongs to; a window restart does not repeat it. The room's own turn prompts and their replies are never duplicated this way, and neither are the agent's housekeeping rows (context compaction notes, routine deliveries, delegation results) or the member's reactions to them. The room starts watching a session the first time it sees it: what was already in that session by then is not replayed, so a room restored on a second Desktop does not re-post its members' history.