fix(desktop): expose react_to_message on remote-desktop sessions - #80659
Closed
fluxkapacitor wants to merge 1 commit into
Closed
fix(desktop): expose react_to_message on remote-desktop sessions#80659fluxkapacitor wants to merge 1 commit into
fluxkapacitor wants to merge 1 commit into
Conversation
The reaction tool's gate required HERMES_DESKTOP=1, which only the local Electron spawn and remote-SSH spawn set. Remote-desktop topologies (Desktop client on machine A -> always-on dashboard/gateway on machine B) never get that env var, so react_to_message stayed hidden even when opted in via Settings -> Appearance. The backend binds HERMES_SESSION_SOURCE=desktop for every desktop turn; accept it (before the DB source='desktop' fallback) so remote-desktop sessions pass the gate while browser-WebUI sessions without the marker stay gated. Opt-in is still required. Fixes NousResearch#80259
This was referenced Aug 7, 2026
Author
|
Superseded by upstream commit 7ad9ace ("fix(agent): the desktop's tools reach it on remote and cloud backends too", by Brooklyn Nicholson) — which replaced the HERMES_DESKTOP=1 env gate with session-source-based gating, covering the same six tools (open_preview, read_preview, read_terminal, close_terminal, focus_pane, react_to_message) on plain-URL and cloud backends. This PR's env-var approach is obsolete; the upstream fix is verified working from a remote-gateway desktop session (reactions round-trip both directions, preview read live). Closing in favor of the merged upstream fix. Issue #80259 already closed as resolved. |
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
Fixes #80259 — the message-reactions agent tool (
react_to_message) stays gated off for desktop sessions served by the currentservebackend — both local and remote — even when the user opted in via Settings → Appearance.Root cause
check_react_requirements()requiredHERMES_DESKTOP=1:That env var is only set by two spawn paths: the legacy
dashboardbackend spawn and the remote-SSH spawn. The currentservebackend the desktop app spawns locally gets it from neither —buildDesktopBackendEnv(apps/desktop/electron/backend-env.ts) sets onlyPYTHONPATH/PYTHONUTF8/PATH— and sessions recorded byservecarry thewebuiplatform label, notsource='desktop'. So the gate fails for local desktop sessions too, and for remote-desktop topologies (Desktop client on machine A → always-on dashboard/gateway on machine B — e.g. laptop → home mini:9120), the opt-in (display.message_reactions) is never reached, and the tool is simply absent from the agent's toolset.Fix
The backend binds one reliable per-turn marker for every desktop session:
HERMES_SESSION_SOURCE=desktop(the same durable signal CLI/TUI sessions use, pergateway/session_context.py). The gate now accepts that marker before falling back to the DBsource='desktop'check:tools/react_to_message_tool.py—_desktop_session_context()acceptsHERMES_SESSION_SOURCE=desktoptests/test_message_reactions.py— +2 tests: the serve-backend shape (noHERMES_DESKTOP, session sourcewebui, per-turn marker present) must pass; the browser-WebUI shape without the desktop marker must stay gated (so the third-party/headless WebUI never gets the tool)Behavior preserved
display.message_reactions) — no surface gets the tool by defaultread_terminal,focus_pane,open_preview, …) keep their existing gates; if maintainers want the whole family unified on the session-source signal, that's a natural follow-up (happy to do it)Testing
scripts/run_tests.sh tests/test_message_reactions.py— 19/19 greenTrueon both the localserve-backend shape and the remote-dashboard shapeThis PR is deliberately not mixed with any other carry (e.g. the bluebubbles webhook fix in #69593).