hermes-agent/apps
brooklyn! ca8c78e588
fix(desktop): heal stale runtime-id cache + model on profile switch (#39819)
Two switch-time regressions from the multi-profile rail work:

- "Session not found" (4007): pruneSecondaryGateways idle-reaps a
  non-active profile's backend; switching back respawns a *fresh*
  backend that mints new runtime ids, but runtimeIdByStoredSessionId is
  never pruned. resumeSession's cache fast-path then makes a dead runtime
  id active and returns, so session.usage + the next prompt 404. Probe
  the cached id; on rejection drop the stale mapping and fall through to
  a full resume that rebinds a live id.

- "Forgets the LLM setting": $currentModel is a nanostore set only by
  refreshCurrentModel (gatewayState->open, etc). A swap fires
  invalidateQueries() (react-query only) and keeps the socket 'open', so
  the model/pill kept showing the previous profile. Re-pull both when
  $activeGatewayProfile changes.
2026-06-05 12:52:44 +00:00
..
bootstrap-installer test(installer): cover the post-update relaunch/install target derivation 2026-06-03 12:02:07 -07:00
desktop fix(desktop): heal stale runtime-id cache + model on profile switch (#39819) 2026-06-05 12:52:44 +00:00
shared fix(desktop): guard reconnect sockets and keep branch search precise 2026-06-03 13:13:21 -05:00