From 268b98253d05ac69e3d98b239277baf0f01b5641 Mon Sep 17 00:00:00 2001 From: "kyssta-exe 25470058+kyssta-exe@users.noreply.github.com" Date: Mon, 20 Jul 2026 10:13:30 +0000 Subject: [PATCH] fix(cli): disarm continuous voice mode via hotkey during agent/transcribe (#67545) In continuous voice mode, pressing the record hotkey (Ctrl+B) was a silent no-op while the agent was running or voice was being transcribed. The hotkey only cleared _voice_continuous when _voice_recording was True, leaving the user trapped in an auto-restart loop that only /voice off could break. Fix: when the agent is running or transcribing, still allow the hotkey to clear _voice_continuous so the loop stops after the current turn. --- cli.py | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/cli.py b/cli.py index 7338aa1fbea..3ed1b73a28c 100644 --- a/cli.py +++ b/cli.py @@ -15028,16 +15028,17 @@ class HermesCLI(CLIAgentSetupMixin, CLICommandsMixin, CLIBillingMixin): daemon=True, ).start() else: - # Guard: don't START recording during agent run or interactive prompts - if cli_ref._agent_running: + # Allow disarming continuous mode even when the agent is + # running or transcribing — otherwise the user is stuck in + # an auto-restart loop until /voice off (#67545). + if cli_ref._agent_running or cli_ref._voice_processing: + with cli_ref._voice_lock: + cli_ref._voice_continuous = False + event.app.invalidate() return + # Guard: don't START recording during interactive prompts if cli_ref._clarify_state or cli_ref._sudo_state or cli_ref._approval_state or cli_ref._slash_confirm_state: return - # Guard: don't start while a previous stop/transcribe cycle is - # still running — recorder.stop() holds AudioRecorder._lock and - # start() would block the event-loop thread waiting for it. - if cli_ref._voice_processing: - return # Interrupt TTS if playing, so user can start talking. # stop_playback() is fast (just terminates a subprocess);