fix(cli): add /sessions handler + recover oneshot response (#22951, #22975) - #23006
Closed
KhanCold wants to merge 7 commits into
Closed
fix(cli): add /sessions handler + recover oneshot response (#22951, #22975)#23006KhanCold wants to merge 7 commits into
KhanCold wants to merge 7 commits into
Conversation
Fixes NousResearch#22951 The /sessions slash command was registered in CommandDef registry (commit 09a4914) but only had a handler in TUI mode. This adds the missing handler for classic CLI mode. - Add elif canonical == "sessions" branch in process_command() - Add _handle_sessions_command() that opens SessionDB, lists sessions, and calls _session_browse_picker() for interactive selection - Handle edge cases: no sessions, DB errors, user cancellation - Use lazy imports to avoid circular dependencies
…eaming returns empty Fixes NousResearch#22975 hermes -z exits with code 0 but produces zero bytes on stdout. The agent successfully calls the API and receives a valid response, but agent.chat() returns empty string when streaming consumes the response before capture. - After agent.chat(), check agent._last_full_response for the accumulated response - Fallback: reconstruct from conversation_history assistant messages - Zero breaking changes — additive recovery logic only - Fixes empty stdout across all providers (anthropic, mlx, grok, gemini)
Fixes NousResearch#22976 When working with multiple Hermes TUI sessions side by side, users resize terminal windows frequently. Each resize event caused blank separator lines (─) to accumulate because Ink's VDOM diff does not clear previous terminal output when canvas geometry changes. - Add terminal clear escape sequence (\x1b[2J\x1b[H) before re-rendering on resize - This forces a full screen invalidation, preventing ghost line accumulation - No impact on normal operation — only fires during resize events
Fixes NousResearch#22970 Running /new, /clear, /undo, or /reload-mcp mid-turn produced a RuntimeWarning: 'coroutine run_in_terminal.<locals>.run was never awaited' The warning occurred because _prompt_text_input() called run_in_terminal() from process_loop which runs in a background thread. run_in_terminal() returns a coroutine that can't be scheduled on the main event loop when called from a non-main thread. - Add threading.current_thread() is threading.main_thread() guard before calling run_in_terminal(), matching the pattern in _run_curses_picker() - Fall back to direct _ask() call when on a background thread - Fixes RuntimeWarning for all destructive slash commands: /new, /clear, /undo, /reload-mcp
Collaborator
… role Fixes NousResearch#22961 In the Dashboard session view, vision_analyze tool results were displayed with the sender label as 'user' instead of 'tool'. This happened because the message role was incorrectly set to 'user' for some vision tool results. - Add effectiveRole override in MessageBubble: when a message has tool_name but role is 'user', display it as 'tool' role instead - This ensures vision_analyze results show the correct 'tool' label and styling (warning/amber color instead of primary) - Only affects display — does not modify the underlying session data
Fixes NousResearch#22960 The /indicator slash command was registered in COMMAND_REGISTRY but had no handler in process_command(), making it silently fail in non-TUI CLI mode. - Add _handle_indicator_command() method to set busy-indicator style (kaomoji/emoji/unicode/ascii) via save_config_value() - Add elif canonical == "indicator" dispatch branch in process_command() - Supports status query (/indicator, /indicator status) and style setting (/indicator kaomoji|emoji|unicode|ascii) - Mirrors the TUI gateway's config.set handler in tui_gateway/server.py
Fixes NousResearch#22952 The npm build script in ui-tui/package.json ended with '&& chmod +x dist/entry.js', which fails on Windows because chmod is not a valid command. This caused 'hermes --tui' to fail with 'TUI build failed' even though all compilation steps (esbuild, tsc, babel) succeeded. - Remove '&& chmod +x dist/entry.js' from the build script - The execute bit is a cosmetic POSIX convenience — the TUI launcher always invokes it via 'node dist/entry.js', which works regardless of file permissions - Fixes Windows TUI startup failure
This was referenced May 17, 2026
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.
Closing in favor of individual PRs per issue. Will split into separate focused PRs as per project guidelines.