hermes - 💡(How to fix) Fix fix(cli, tui): /sessions unknown command in classic CLI + chmod breaks TUI build on Windows [1 comments, 1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
NousResearch/hermes-agent#22948Fetched 2026-05-11 03:32:14
View on GitHub
Comments
1
Participants
1
Timeline
2
Reactions
0
Author
Participants
Timeline (top)
closed ×1commented ×1

Two Windows-specific bugs found after commit 09a491464 which added the /sessions slash command.

Root Cause

Root cause: The /sessions command was registered in the central CommandDef registry (hermes_cli/commands.py:113) so it shows up in /help and autocomplete, but the handler was only implemented in the TUI (ui-tui/src/app/slash/commands/session.ts). The classic CLI's process_command() in cli.py has no elif canonical == "sessions" branch, so typing /sessions in the default REPL mode prints "Unknown command."

Code Example

hermes
> /sessions
Unknown command: /sessions

---

hermes --tui
TUI build failed.
# ... esbuild succeeds but chmod fails
RAW_BUFFERClick to expand / collapse

Summary

Two Windows-specific bugs found after commit 09a491464 which added the /sessions slash command.

Bug 1: /sessions unknown command in classic CLI

Root cause: The /sessions command was registered in the central CommandDef registry (hermes_cli/commands.py:113) so it shows up in /help and autocomplete, but the handler was only implemented in the TUI (ui-tui/src/app/slash/commands/session.ts). The classic CLI's process_command() in cli.py has no elif canonical == "sessions" branch, so typing /sessions in the default REPL mode prints "Unknown command."

Bug 2: hermes --tui build fails on Windows

Root cause: The build script in ui-tui/package.json ends with && chmod +x dist/entry.js. On Windows, chmod is not a valid command, causing npm run build to exit with a non-zero code. The _make_tui_argv() function in hermes_cli/main.py then prints "TUI build failed" and exits — even though all compilation steps (esbuild, tsc, babel) actually succeed.

Fix (PR-ready)

Two small changes:

  1. ui-tui/package.json — Remove && chmod +x dist/entry.js from the build script. The execute bit is irrelevant on Windows, and on POSIX the file permission is cosmetic since the TUI launcher always invokes it via node dist/entry.js.

  2. cli.py — Add elif canonical == "sessions" to process_command() with a _handle_sessions_command() method that opens SessionDB, calls _session_browse_picker() (reused from hermes_cli.main), and relaunch() to resume the selected session.

How to reproduce

Bug 1:

hermes
> /sessions
Unknown command: /sessions

Bug 2 (Windows):

hermes --tui
TUI build failed.
# ... esbuild succeeds but chmod fails

Environment

  • Windows 10
  • Hermes after commit 09a491464
  • git-bash (MSYS2) shell

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING