fix: recover dashboard chat sessions after token rotation - #22010
Draft
mfaiz-007 wants to merge 5 commits into
Draft
fix: recover dashboard chat sessions after token rotation#22010mfaiz-007 wants to merge 5 commits into
mfaiz-007 wants to merge 5 commits into
Conversation
mfaiz-007
force-pushed
the
fix/dashboard-session-resume-reliability
branch
from
May 9, 2026 01:35
76351a9 to
7813c5f
Compare
mfaiz-007
force-pushed
the
fix/dashboard-session-resume-reliability
branch
from
May 12, 2026 13:14
7813c5f to
1f20c19
Compare
mfaiz-007
force-pushed
the
fix/dashboard-session-resume-reliability
branch
from
May 19, 2026 11:26
1f20c19 to
418453a
Compare
teknium1
reviewed
Jul 13, 2026
teknium1
left a comment
Contributor
There was a problem hiding this comment.
Thanks for pursuing durable dashboard recovery. The underlying issue remains relevant, but this draft predates the current keep-alive PTY registry and needs a focused transplant.
Problems
- Current main attaches through
hermes_cli/web_server.py:15464and replays buffered bytes after setting the socket inhermes_cli/pty_session.py:88-93. A replay-send exception can leave the dead socket marked attached. The draft's_DashboardPtySessioncleanup targets a replaced architecture, andgit apply --checkshows the patch no longer applies. - The draft's latest-session recovery is not profile-scoped. Current descendant lookup carries the management profile in
web/src/lib/api.ts:362-367; recovery must preserve that boundary. - The added non-secret dashboard
HERMES_*tuning variables conflict with the repository configuration policy; use existing behavior or config.yaml-backed settings.
Suggested changes
- Salvage the replay-failure cleanup and regression test against
PtySessionRegistry. - Rebuild durable resume around the current profile-scoped APIs and attach-token flow.
Automated hermes-sweeper review.
| @@ -3287,6 +3342,12 @@ class PtyUnavailableError(RuntimeError): # type: ignore[no-redef] | |||
|
|
|||
Contributor
There was a problem hiding this comment.
Please do not add behavioral configuration through a new non-secret HERMES_* variable. Dashboard PTY limits should remain fixed or be exposed through the config.yaml mechanism; this PR's recovery fix should not introduce an env-var configuration surface.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
sessionStorage, and fall back to the latest valid server-side session.Tests
scripts/run_tests.sh tests/test_tui_gateway_server.py::test_session_info_exposes_persistent_resume_session_id tests/test_tui_gateway_server.py::test_session_most_recent_returns_first_non_denied tests/test_tui_gateway_server.py::test_session_most_recent_returns_null_when_only_tool_rows tests/test_tui_gateway_server.py::test_session_most_recent_folds_db_exception_into_null_result tests/test_tui_gateway_server.py::test_session_most_recent_handles_db_unavailable tests/hermes_cli/test_web_server.py::TestWebServerEndpoints::test_get_most_recent_session_filters_internal_and_empty_rows tests/hermes_cli/test_web_server.py::TestWebServerEndpoints::test_get_sessions_defaults_hide_cron_and_empty_sessions tests/hermes_cli/test_web_server.py::TestPtyWebSocket::test_attach_failure_detaches_dead_websocket tests/hermes_cli/test_web_server.py::TestPtyWebSocket::test_channel_disconnect_keeps_pty_alive_for_reconnect tests/test_hermes_state.py::TestCompressionChainProjection::test_resumable_only_includes_empty_compression_root_with_message_tip tests/test_hermes_state.py::TestCompressionChainProjection::test_resumable_only_does_not_count_empty_orphan_compression_root✅ 11 passednpm --prefix web run build✅git diff --check✅ for the focused branch diff before pushNotes
npm --prefix web run lintcurrently reports unrelated existing repo-wide lint errors outside this focused change set, so it is not used as a pass/fail signal for this PR.