hermes-agent/apps
Brooklyn Nicholson e3ed7722b5 fix(desktop): refuse a foreign backend's session token after readiness
The served-token fallback adopts whatever token the dashboard HTML
injects. That is correct when our own child regenerated the token (env
pin lost across a shell-wrapped spawn), but wrong when the readiness
probe answered from a process we did not spawn: /api/status is public,
so an orphaned dashboard squatting the port passes waitForHermes while
our child dies on the bind conflict. Silently adopting that process's
token would authenticate the renderer against a foreign backend,
possibly on the wrong profile.

Discriminate on child liveness: the desktop pins
HERMES_DASHBOARD_SESSION_TOKEN on every spawn, so a live child always
serves our token. Served-token mismatch + dead child = foreign backend;
fail the boot loudly instead of connecting. Mismatch + live child keeps
the adopt-served-token salvage from #43720.
2026-06-11 18:18:22 -05:00
..
bootstrap-installer change(tooling): typecheck in CI, update ts to 6 2026-06-10 11:59:34 -04:00
desktop fix(desktop): refuse a foreign backend's session token after readiness 2026-06-11 18:18:22 -05:00
shared change(tooling): typecheck in CI, update ts to 6 2026-06-10 11:59:34 -04:00