feat(cli): terminal tab titles + desktop notifications for agent state - #24632
Closed
Jpalmer95 wants to merge 1 commit into
Closed
feat(cli): terminal tab titles + desktop notifications for agent state#24632Jpalmer95 wants to merge 1 commit into
Jpalmer95 wants to merge 1 commit into
Conversation
Add tab title updates and optional OS-level desktop notifications so users
with multiple terminal tabs can see at a glance which Hermes session needs
attention.
Changes:
agent/notification.py
- Cross-platform desktop notification helpers (notify-send on Linux,
osascript on macOS, PowerShell on Windows)
- Convenience wrappers: notify_approval_needed, notify_question,
notify_error, notify_turn_complete
agent/display.py
- Notification config globals (_notif_enabled, _notif_tab_title,
_notif_desktop) and init_notifications() for CLI startup
- get_notification_config() for /notif query
- set_tab_title() and _reset_tab_title() for terminal tab title control
- KawaiiSpinner.start() updates tab title to "Thinking..."
- KawaiiSpinner.update_text() extracts tool name for tab title
- KawaiiSpinner.stop() resets tab title to default
hermes_cli/config.py
- display.notifications config section: enabled, tab_title, desktop,
events (approval, clarify, error, turn_complete)
- All notifications OFF by default
cli.py
- Initialize notifications at CLI startup from config
- _approval_callback: sets tab title + desktop notify on command approval
- _clarify_callback: sets tab title + desktop notify on agent questions
- Turn complete: resets tab title + optional desktop notification
- _handle_notif_command: full /notif CLI command with on/off/status/tab/desktop
hermes_cli/commands.py
- Register /notif slash command
tests/agent/test_notification.py
- 25 comprehensive tests covering all modules
Config examples:
display.notifications.enabled: true # enable tab titles
display.notifications.desktop: true # enable OS notifications
Collaborator
teknium1
reviewed
Jul 13, 2026
teknium1
left a comment
Contributor
There was a problem hiding this comment.
Thanks for the cross-platform implementation. The underlying classic-CLI need remains: current main's automatic title path is TUI-only (ui-tui/src/app/useMainApp.ts:576-586), so this is not redundant.
Problems
hermes_cli/config.py:978addsdisplay.notifications.events, but the diff'sinit_notifications()only acceptsenabled,tab_title, anddesktop; no production path consumes the four event flags. In particular,agent/notification.pydefinesnotify_error()but the changedcli.pypaths do not call it.agent/display.pyclears the title on spinner stop, while the PR documents aHermes - Readyidle title.hermes_cli/commands.pydropscli_only=Truefrom the existing/indicatorentry without implementing or testing gateway behavior for it.
Suggested changes
- Make each configured event gate its corresponding emission, including an actual classic-CLI error path, and cover suppression behavior in tests.
- Restore the documented ready title at turn completion.
- Restore
/indicatoras CLI-only unless its broader availability is intentional and covered.
Automated hermes-sweeper review.
| # or PowerShell (Windows). | ||
| "notifications": { | ||
| "enabled": False, # Master switch for all notification features | ||
| "tab_title": True, # Update terminal tab title on state changes |
Contributor
There was a problem hiding this comment.
These event flags are not consumed by the added runtime: init_notifications() only receives enabled/tab_title/desktop, and the changed CLI paths do not read approval, clarify, error, or turn_complete. Please thread these controls into each notification emission or remove them.
Collaborator
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
Add terminal tab title updates and optional OS-level desktop notifications so users with multiple terminal tabs can see at a glance which Hermes session needs attention.
The Problem
When running multiple Hermes instances in different terminal tabs/instances, users have no way to tell which session needs their input without tab-switching. The agent may be waiting for command approval, a clarify answer, or may have hit an error — but the user can't see this without focusing the right tab.
The Solution
Two complementary notification mechanisms, both off by default:
1. Terminal Tab Titles (lightweight, recommended first step)
Updates the terminal emulator's window/tab title bar using standard OSC escape sequences, reflecting the agent's current state:
Hermes - Ready— waiting for inputHermes - Thinking...— calling the LLMHermes - Using tool: terminal— executing a toolHermes - Waiting for approval— command approval neededHermes - Has a question for you— agent clarifiedHermes - Error— API/tool failureWorks in GNOME Terminal, iTerm2, Alacritty, Kitty, Windows Terminal, WezTerm, and tmux (with
set-titles on).2. Desktop Notifications (optional)
Native OS notifications appearing in the system notification tray:
notify-send(freedesktop.org)osascriptUsage
Config (permanent):
In-session (
/notifcommand):Files Changed
agent/notification.pyagent/display.pyinit_notifications(),set_tab_title(), KawaiiSpinner start/stop hookscli.py_handle_notif_command()hermes_cli/config.pydisplay.notificationsconfig section with defaultshermes_cli/commands.py/notifslash command registrationtests/agent/test_notification.pyCross-Platform
platform.system()guards,shutil.which()checks, PowerShell escapingTests
25 new tests, all passing:
/notifin registry)python -m pytest tests/agent/test_notification.py -v— 25/25 passed.