Skip to content

fix(cli): Ctrl+B voice hotkey disarms continuous during STT/agent - #67573

Closed
webtecnica wants to merge 1 commit into
NousResearch:mainfrom
webtecnica:fix/67545-voice-hotkey-stt
Closed

fix(cli): Ctrl+B voice hotkey disarms continuous during STT/agent#67573
webtecnica wants to merge 1 commit into
NousResearch:mainfrom
webtecnica:fix/67545-voice-hotkey-stt

Conversation

@webtecnica

Copy link
Copy Markdown
Contributor

Summary

Fixes #67545: In CLI continuous voice mode, pressing Ctrl+B (the record hotkey) during STT processing or while the agent is running was a silent no-op — it didn't disarm continuous mode, so the loop auto-restarted recording after the turn.

Root Cause

In handle_voice_record in cli.py, the non-recording branch (else) had three early-return guards (_agent_running, interactive prompts, _voice_processing) that returned without clearing _voice_continuous. The fourth path (default) would arm continuous and start a new recording. There was no path to disarm continuous without being in the recording state.

Fix

Added a check at the top of the non-recording branch: if _voice_continuous is already True, disarm it immediately and return. This makes the hotkey a proper toggle:

  • Press while recording → stop + disarm (existing behavior)
  • Press while continuous armed but not recording (STT/agent/processing) → disarm (NEW)
  • Press while continuous not armed → arm + start recording (existing behavior)

Changes

  • cli.py: ~12 lines added to handle_voice_record — disarm check before the existing guards

Testing

  • All 84 existing voice CLI integration tests pass (tests/tools/test_voice_cli_integration.py)
  • The fix is purely controlled by the _voice_continuous flag — no STT/TTS provider changes

When continuous voice is active and the user presses Ctrl+B while
STT is processing (_voice_processing) or the agent is running
(_agent_running), the hotkey was a silent no-op — it didn't clear
_voice_continuous, so the loop auto-restarted after the turn.

Fix: add a check at the top of the non-recording branch — if
_voice_continuous is already True, disarm it immediately and
return. This makes the hotkey a proper toggle: press while
recording → stop+disarm; press while continuous armed but not
recording → disarm; press while continuous not armed → arm+start.

Fixes NousResearch#67545.
@teknium1

Copy link
Copy Markdown
Contributor

Thanks for the focused CLI fix. Current main confirms the reported control-flow gap: cli.py:14329-14338 returns for agent-running and STT-processing states without clearing _voice_continuous, while cli.py:15570-15580 restarts recording when that flag remains set. The proposed pre-guard disarm directly addresses those paths.

Problems

  • Please add a behavioral regression test. tests/tools/test_voice_cli_integration.py:711-798 checks handler source structure but does not invoke handle_voice_record for _voice_continuous=True combined with _voice_processing or _agent_running.

Suggested changes

  • Exercise the registered hotkey binding for both blocked non-recording states and assert it clears _voice_continuous without scheduling recording.

Automated hermes-sweeper review.

@teknium1 teknium1 added sweeper:risk-compatibility Sweeper risk: may break existing users, config, migrations, defaults, or upgrades sweeper:blast-moderate Sweeper blast radius: moderate — a subsystem or single platform labels Jul 19, 2026
@alt-glitch alt-glitch added type/bug Something isn't working P2 Medium — degraded but workaround exists comp/cli CLI entry point, hermes_cli/, setup wizard tool/tts Text-to-speech and transcription needs-decision Awaiting maintainer decision before any implementation labels Jul 19, 2026
@alt-glitch

Copy link
Copy Markdown
Collaborator

This was generated by AI during triage.

Related to #67550 and #67569. This version disarms continuous mode for every armed non-recording hotkey path, while the siblings scope the change to specific busy/STT paths.

@teknium1

Copy link
Copy Markdown
Contributor

The record-hotkey/continuous-mode fix landed in #73520 via @kyssta-exe's #67550, submitted 67 minutes earlier. Thanks for independently finding the same bug!

(Landed via #73520, merge e04c2a9ebd.) Closing.

@teknium1 teknium1 closed this Jul 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/cli CLI entry point, hermes_cli/, setup wizard needs-decision Awaiting maintainer decision before any implementation P2 Medium — degraded but workaround exists sweeper:blast-moderate Sweeper blast radius: moderate — a subsystem or single platform sweeper:risk-compatibility Sweeper risk: may break existing users, config, migrations, defaults, or upgrades tool/tts Text-to-speech and transcription type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: CLI continuous voice — record hotkey (Ctrl+B) ignored during STT/agent; only /voice off exits loop

3 participants