hermes-agent/apps/desktop/src/app
Brooklyn Nicholson cd5fb760a5 fix(desktop): restore cross-wired runtime-id guard on session resume
resumeSession's warm-cache fast-path once again trusted the
storedSessionId -> runtimeId -> ClientSessionState mapping without
checking the cached state still BELONGS to the session being resumed. A
pooled profile backend that gets idle-reaped and respawned re-mints
runtime ids, so a recycled id resolves to a live-but-DIFFERENT session's
cache entry and paints the wrong transcript under the current route:
click thread A, a totally different thread (often from another worktree)
loads. The session.usage 404 guard only catches a fully-dead id; a
recycled-live id 200s, so the fast-path happily served the stale cache.

Straight regression, not a new bug. f7bf74064 ("reject cross-wired
runtime-id cache on session resume") landed takeWarmCache() + its
regression test; 62af32efe ("keep active sessions aligned with cwd"),
rebased off a stale branch, restructured resumeSession and silently
reverted both 29 minutes later -- the exact stale-branch squash clobber
AGENTS.md warns about ("Squash merges from stale branches silently
revert recent fixes").

Re-apply the whole-class fix on top of the current cwd-aligned code:
takeWarmCache() validates state.storedSessionId === storedSessionId at
BOTH cache reads (the early transcript-keep decision and the fast-path),
purging a cross-wired mapping on a miss so it falls through to a full
resume that rebinds a correct runtime id. Restore the two regression
tests guarding it.

Tests: resumeSession warm-cache mapping integrity -- a cross-wired
mapping is rejected + purged (the bug), a correctly-wired cache is still
served with no needless refetch (no perf regression).

Co-authored-by: professorpalmer <professorpalmer@users.noreply.github.com>
2026-06-28 18:23:09 -05:00
..
agents style(desktop,tui): fix all lint/type/formatting issues 2026-06-26 01:04:33 -05:00
artifacts style(desktop,tui): fix all lint/type/formatting issues 2026-06-26 01:04:33 -05:00
chat fix(desktop): remote project picker UX and profile-scoped fs/git routing 2026-06-28 16:23:39 -05:00
command-center style(desktop,tui): fix all lint/type/formatting issues 2026-06-26 01:04:33 -05:00
command-palette style(desktop,tui): fix all lint/type/formatting issues 2026-06-26 01:04:33 -05:00
cron style(desktop,tui): fix all lint/type/formatting issues 2026-06-26 01:04:33 -05:00
gateway/hooks style(desktop,tui): fix all lint/type/formatting issues 2026-06-26 01:04:33 -05:00
hooks feat(desktop): add composer coding rail and worktree flow 2026-06-25 16:40:27 -05:00
messaging fix(desktop): broken "Open setup guide" button for plugin platforms 2026-06-27 04:34:08 +05:30
overlays refactor(desktop): converge cron overlay onto profiles' split layout 2026-06-06 16:39:56 -05:00
pet-generate style(desktop,tui): fix all lint/type/formatting issues 2026-06-26 01:04:33 -05:00
pet-overlay refactor(desktop): collapse overlay zoom-anchor math 2026-06-26 00:42:19 -05:00
profiles style(desktop,tui): fix all lint/type/formatting issues 2026-06-26 01:04:33 -05:00
right-sidebar fix(desktop): remote project picker UX and profile-scoped fs/git routing 2026-06-28 16:23:39 -05:00
session/hooks fix(desktop): restore cross-wired runtime-id guard on session resume 2026-06-28 18:23:09 -05:00
settings fix(desktop): show custom (non-curated) model in Settings model pickers 2026-06-26 18:55:44 -05:00
shell fix(desktop): keep titlebar overlay off session title 2026-06-26 19:18:26 -06:00
skills style(desktop,tui): fix all lint/type/formatting issues 2026-06-26 01:04:33 -05:00
desktop-controller.tsx fix(desktop): remote project picker UX and profile-scoped fs/git routing 2026-06-28 16:23:39 -05:00
floating-hud.ts style(desktop): use the nous overlay surface (--stroke-nous + --shadow-nous) for the HUDs 2026-06-09 23:49:02 -05:00
index.tsx Add Hermes desktop app (#20059) 2026-05-31 17:46:56 -05:00
layout-constants.ts feat(desktop): hover-reveal collapsed sidebars as fixed overlays (#41670) 2026-06-07 22:41:21 -05:00
model-picker-overlay.tsx Add Hermes desktop app (#20059) 2026-05-31 17:46:56 -05:00
model-visibility-overlay.tsx feat(desktop): inline model picker in the status bar 2026-06-02 19:09:41 -05:00
page-search-shell.tsx feat(desktop): add i18n with Simplified Chinese (zh-Hans) support 2026-06-05 10:32:26 -07:00
routes.ts chore(desktop): zero eslint/typecheck debt + prettier pass (#39100) 2026-06-04 14:10:38 +00:00
session-picker-overlay.tsx desktop: registry-driven slash commands + first-class /resume & /handoff (#42351) 2026-06-11 01:49:24 +00:00
session-switcher.tsx style(desktop,tui): fix all lint/type/formatting issues 2026-06-26 01:04:33 -05:00
types.ts fix(desktop): render send/prefill directive notices (/goal, /undo) (#49073) 2026-06-19 07:28:50 -07:00
updates-overlay.tsx Merge pull request #52828 from helix4u/fix/desktop-backend-update-indicator 2026-06-26 11:49:07 -05:00