From 37752ff1ac5e3bcda47b10e5eba164affb38f13e Mon Sep 17 00:00:00 2001 From: teknium1 Date: Sun, 8 Mar 2026 19:41:17 -0700 Subject: [PATCH] =?UTF-8?q?feat:=20bell=5Fon=5Fcomplete=20=E2=80=94=20term?= =?UTF-8?q?inal=20bell=20when=20agent=20finishes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Adds a simple config option to play the terminal bell (\a) when the agent finishes a response. Useful for long-running tasks — switch to another window and your terminal will ding when done. Works over SSH since the bell character propagates through the connection. Most terminal emulators can be configured to flash the taskbar, play a sound, or show a visual indicator on bell. Config (default: off): display: bell_on_complete: true Closes #318 --- cli-config.yaml.example | 5 +++++ cli.py | 8 ++++++++ hermes_cli/config.py | 1 + website/docs/user-guide/configuration.md | 1 + 4 files changed, 15 insertions(+) diff --git a/cli-config.yaml.example b/cli-config.yaml.example index 6b1cf97c..ec7ccb62 100644 --- a/cli-config.yaml.example +++ b/cli-config.yaml.example @@ -635,3 +635,8 @@ display: # verbose: Full args, results, and debug logs (same as /verbose) # Toggle at runtime with /verbose in the CLI tool_progress: all + + # Play terminal bell when agent finishes a response. + # Useful for long-running tasks — your terminal will ding when the agent is done. + # Works over SSH. Most terminals can be configured to flash the taskbar or play a sound. + bell_on_complete: false diff --git a/cli.py b/cli.py index 8e67492b..828d820f 100755 --- a/cli.py +++ b/cli.py @@ -1035,6 +1035,8 @@ class HermesCLI: self.tool_progress_mode = CLI_CONFIG["display"].get("tool_progress", "all") # resume_display: "full" (show history) | "minimal" (one-liner only) self.resume_display = CLI_CONFIG["display"].get("resume_display", "full") + # bell_on_complete: play terminal bell (\a) when agent finishes a response + self.bell_on_complete = CLI_CONFIG["display"].get("bell_on_complete", False) self.verbose = verbose if verbose is not None else (self.tool_progress_mode == "verbose") # Configuration - priority: CLI args > env vars > config file @@ -3120,6 +3122,12 @@ class HermesCLI: # nothing can interleave between the box borders. _cprint(f"\n{top}\n{response}\n\n{bot}") + # Play terminal bell when agent finishes (if enabled). + # Works over SSH — the bell propagates to the user's terminal. + if self.bell_on_complete: + sys.stdout.write("\a") + sys.stdout.flush() + # Combine all interrupt messages (user may have typed multiple while waiting) # and re-queue as one prompt for process_loop if pending_message and hasattr(self, '_pending_input'): diff --git a/hermes_cli/config.py b/hermes_cli/config.py index 208b95cb..9b58115f 100644 --- a/hermes_cli/config.py +++ b/hermes_cli/config.py @@ -107,6 +107,7 @@ DEFAULT_CONFIG = { "compact": False, "personality": "kawaii", "resume_display": "full", # "full" (show previous messages) | "minimal" (one-liner only) + "bell_on_complete": False, # Play terminal bell (\a) when agent finishes a response }, # Text-to-speech configuration diff --git a/website/docs/user-guide/configuration.md b/website/docs/user-guide/configuration.md index f2abd16c..7fd88fb3 100644 --- a/website/docs/user-guide/configuration.md +++ b/website/docs/user-guide/configuration.md @@ -581,6 +581,7 @@ display: personality: "kawaii" # Default personality for the CLI compact: false # Compact output mode (less whitespace) resume_display: full # full (show previous messages on resume) | minimal (one-liner only) + bell_on_complete: false # Play terminal bell when agent finishes (great for long tasks) ``` | Mode | What you see |