Description
When switching between two existing chat sessions in Hermes Desktop, data from one session bleeds into the other ("data merging bug"). It is not possible to switch between chats cleanly / simultaneously — the context or draft/state of one session gets pulled into the other, so the two sessions appear to share or merge state.
This looks related to the session-state integrity class (see #63210 composer draft race and the project-association-loss bug): the per-session state bucket is not being isolated correctly on switch.
Root cause (hypothesis)
The active-session state object is shared/mounted before the target session's state is fully hydrated, so the previous session's state remains attached. If the composer/state API mounts in a stale-session context (same class of bug as getState()-returns-null in #63210, but here the bug is the wrong state rather than null), switching carries the old session's data forward instead of swapping to the new one.
Steps to reproduce
- Open Hermes Desktop with at least two existing chat sessions that have distinct content/context.
- Switch from session A to session B (via the sidebar / session list).
- Observe whether session B shows any data, drafts, or context that belongs to session A, or whether the two appear merged.
- Switch back and forth — note if the contamination persists or chains.
Expected
Each session switch should fully swap to the target session's isolated state, with no carry-over from the previously active session.
Environment
- OS: Windows 10 64-bit
- Hermes: 0.18.2 (win-unpacked)
Possible fix direction
Ensure the session-state bucket is keyed strictly per-session id and that the switch handler awaits full teardown of the old state before mounting the new one (await hydration before binding the composer/state API, mirroring the fix direction in #63358 but for the switch path, not only new-session).
Description
When switching between two existing chat sessions in Hermes Desktop, data from one session bleeds into the other ("data merging bug"). It is not possible to switch between chats cleanly / simultaneously — the context or draft/state of one session gets pulled into the other, so the two sessions appear to share or merge state.
This looks related to the session-state integrity class (see #63210 composer draft race and the project-association-loss bug): the per-session state bucket is not being isolated correctly on switch.
Root cause (hypothesis)
The active-session state object is shared/mounted before the target session's state is fully hydrated, so the previous session's state remains attached. If the composer/state API mounts in a stale-session context (same class of bug as
getState()-returns-null in #63210, but here the bug is the wrong state rather than null), switching carries the old session's data forward instead of swapping to the new one.Steps to reproduce
Expected
Each session switch should fully swap to the target session's isolated state, with no carry-over from the previously active session.
Environment
Possible fix direction
Ensure the session-state bucket is keyed strictly per-session id and that the switch handler awaits full teardown of the old state before mounting the new one (await hydration before binding the composer/state API, mirroring the fix direction in #63358 but for the switch path, not only new-session).