`SessionDB.resolve_session_by_title()` prefers a "`<title> #N`" continuation over the
exact match. For the canonical Bot Chat that preference is wrong: Bot Mode identifies
that session BY its exact title, and this lookup is the only one every DM transport
shares (`hermes -p <bot> chat --in ~ -c "Bot Chat"` — used by `message_agent`,
`bot_relay` and cron delivery).
Once a numbered sibling exists (a Desktop branch of the canonical chat,
`title_source='derived'`), every teammate DM resolves to that sibling: a visible,
unmanaged session where the `message_agent` gate is off, so the addressed bot cannot
answer and the sender gets silence instead of an error.
Return the exact match when the requested title IS the canonical Bot Chat title; every
other title keeps the "newest continuation wins" behaviour untouched.
(cherry picked from commit e92638b4c53c97c48db4d9bbb2d3b6b580d289a7)
hermes_state.py: delete every '# noqa: F401 (re-exported...)' import block (hermes_state_common/errors/guard/
readpool/sessions/fts/dbfile/wal/repair/registry + agent.context_compressor _DB_PERSISTED_MARKER_KEY); keep
only the names hermes_state.py itself uses, without noqa.
hermes_state_registry.py: drop get_shared_session_db/release_shared_session_db/close_shared_session_dbs
aliases; every caller (gateway/, tools/, tui_gateway/, cron/, mcp_serve, run_agent, tests) now imports
acquire/release/close_all/release_or_close from hermes_state_registry.
hermes_state_titles.py: drop set_auto_title_if_empty shim (title_generator keeps its getattr fallback).
Re-remove shim-only names restored by 34abf954bd: latest_user_message_row_id (tests call
latest_message_row_id(key, role='user'); role-targeting assertions kept) and get_session_activity (tests
build the snapshot via agent.session_activity.build_activity_snapshot over db.get_session(sid)).
hermes_state_wal._log_once resolves its dedupe sets as module globals instead of via hermes_state;
hermes_state_repair helpers call module globals directly (tests patch hermes_state_repair.<name>).
Frozen updater surface untouched (update_cmd_maint imports only SessionDB from hermes_state).