You Stopped the Bot, Restarted the Window, and It Spoke Again


Three in the afternoon, two bots in a group chat start talking over each other. You put one on hold by hand and the room goes quiet. That evening you close the Hermes window; the next morning you open it, and the bot is talking again.

You assume the model got eager. It did not. The hold you set was dropped while the room was being saved.

What a room record actually holds

Usually you only care about the transcript (log). But a group chat room record also carries a row of settings you changed once and never look at again:

  • holds — which bots you stopped;
  • heldMessages — messages withheld until a condition clears;
  • holdDetection — the stop-detection switch;
  • sessionOwners — which session belongs to which member;
  • stranded, externalCursors, watermarks — stuck messages, external cursors, watermarks;
  • pinned, rosterOrder, sectionId — pinning, roster order and the sidebar section.

Three writers, each one a little shorter

The trouble was that “saving the record” was not one piece of code. Three places each rebuilt it field by field:

  • updateGroupChat — every room edit, writing the full record;
  • durableGroupChatRooms — every gateway sync pull and publish, missing holds and sessionOwners;
  • the disbandGroupChat rewrite — rebuilding the rooms on disband, missing holds, heldMessages, holdDetection, stranded, externalCursors, pinned, rosterOrder and sectionId.

The second one is the easiest to reproduce: after any gateway sync, a window restart released a bot you had stopped (issue #93129). The third is quieter — disbanding one room also wiped part of another room’s settings.

Reading it back loses fields too

Hydration had the same problem on the way in: holdDetection and heldMessages were never restored.

holdDetection is the nasty one, because its default is “on” — it is written as room.holdDetection !== false. A missing field therefore reads as true. You turned stop detection off, and it comes back on; all you notice is that the bot once again thinks it can tell whether you are around.

Why “add the field back” never finished the job

This had happened before. roomId, sectionId, heldMessages and engine had each been patched in separately — one discovered field at a time, one line in whichever writer was missing it.

With three hand-copied field lists, the next field added to a room would still be missed somewhere, and the fields that go missing are exactly the ones you set once and cannot see: a hold, a pin, a section. You find out the next morning.

The fix: one projection, one hydration, a type that enforces it

PR #158809 closed the whole class:

  • group-chat-record.ts holds one write projection, durableGroupChatRoom(), and one read path, hydrateDurableGroupChatRoom();
  • all three writers go through persistGroupChatRooms instead of assembling fields themselves;
  • the type leaves no room to drift: DurableGroupChat requires every GroupChat key except three runtime-only ones (epoch, running, tombstone). Add a field to GroupChat without adding it to the projection, or drop one from either function, and tsc fails the build — instead of a user finding the setting gone the next day.

The other quiet bug: storing a live tombstone as an ordinary room

A room that is mid-turn when it is disbanded does not vanish immediately; it stays in memory as a runtime tombstone.

The next disband rewrites the whole room table. If that tombstone is written to disk as an ordinary room, a reload shows you an empty room — not “the disband did not take”, but a phantom room that was stored as if it were real. The new test pins exactly that: a disband rewrite may only keep real rooms, never a runtime tombstone.

What you can do

  • Update Hermes to a build that carries the fix (today it is on main, see below).
  • After upgrading, walk your group chats once: is the bot you paused still paused, are the pins and the sidebar section still there, is stop detection still where you set it? Settings damaged by the old behaviour need to be set again by hand.
  • Back up before big Desktop changes; the Desktop backup and transfer guide has the whole procedure.
  • If you write Desktop plugins yourself, the rule is blunt: one persisted record gets exactly one projection function. A second “quick rebuild” is a second copy that will drift, and the type checker only protects what it can see.

Status: main only

PR #158809 merged on November 22 and lives on main — it is not in the v0.23.3 tag.

Update (2026-11-25): these changes shipped in v0.23.4 (November 24) — hermes update brings them in. The “not in v0.23.3 / on main only” wording above is a snapshot from publication time.

The one-paragraph version

Your hold did not fail; it was never saved. Three writers each carried their own field list, and the fields they dropped were the ones you cannot see at a glance — a hold, a pin, a section. One projection plus a completeness-checked type turns that from “find it the next morning” into a build error.

If group chats themselves are new to you, start with the Bot Mode group chat guide.