Skip to content

fix(desktop): send session_id to shell.exec on Hermes main - #45

Merged
Adolanium merged 1 commit into
mainfrom
fix/44-shell-exec-session-id
Oct 19, 2026
Merged

Adolanium merged 1 commit into
mainfrom
fix/44-shell-exec-session-id

Conversation

@Adolanium

Copy link
Copy Markdown
Owner

Fixes #44. Thanks to @sand01chi for the root-cause analysis.

On Hermes main the Desktop socket serves the canonical, session-scoped shell.exec (gateway/session_shell.py). It refuses a call without session_id with invalid_params, so the probe never started and the page showed no cards.

Changes

  • New shellExec() helper: sends { command, session_id } using the focused session, then retries once with { command } if the call is refused with invalid_params/extra_forbidden. Older backends with the sidecar shell.exec reject session_id.
  • A refusal shows as shell.exec refused: <reason> and stops the interpreter/path search. Before, it repeated for every candidate.
  • With no focused session on Hermes main, the error says to open a chat, then refresh.
  • Rebuilt catalog/desktop/plugin.js.

Tests

test_shell_exec_session.cjs covers the canonical, sidecar, no-session and other-refusal cases for both plugin copies. node --test *.cjs: 87 pass, 1 skipped. pytest: 104 pass.

Hermes main serves the session-scoped shell.exec, which refuses a call
without session_id as invalid_params, so the probe never ran (#44).
Send the focused session id and retry bare once when the scoped call is
refused, for older backends whose sidecar shell.exec rejects session_id.

A refusal is now labelled "shell.exec refused: <reason>" and ends the
interpreter/path search instead of repeating for every candidate. With
no focused session on Hermes main, the error says to open a chat.

Fixes #44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Desktop probe never runs on Hermes main: shell.exec refused with 4001 invalid_params (session_id not sent)

1 participant