Voice mode doesn't auto-activate on session start when voiceEnabled is persisted

Resolved 💬 3 comments Opened Mar 5, 2026 by kimbucha Closed Mar 8, 2026

Bug Description

When voiceEnabled: true is persisted in ~/.claude/settings.json (from a previous session where /voice was enabled), starting a new claude session does not auto-activate voice mode. Holding Space does nothing until the user manually runs /voice to disable and then /voice again to re-enable.

Steps to Reproduce

  1. Start Claude Code (claude)
  2. Run /voice to enable voice mode — confirm "Voice mode enabled. Hold Space to record."
  3. Exit the session (Ctrl+C or /exit)
  4. Verify ~/.claude/settings.json contains "voiceEnabled": true
  5. Start a new Claude Code session (claude)
  6. Hold Space — nothing happens (expected: recording should start)
  7. Run /voice — outputs "Voice mode disabled."
  8. Run /voice again — outputs "Voice mode enabled. Hold Space to record."
  9. Hold Space — now it works

Expected Behavior

When voiceEnabled: true is already in settings.json, voice mode should be fully active when the new session starts — spacebar should immediately work for recording without needing to toggle /voice off and on.

Root Cause Analysis

Traced through the minified bundle (cli.js v2.1.69):

  • Settings loading (nD1() function): Reads voiceEnabled from settings and sets a boolean in app state, but does NOT trigger voice subsystem initialization (microphone setup, keyboard listener registration)
  • /voice command (jGz() function): Contains the full voice activation path — checks microphone permissions, verifies audio recording dependencies (sox/arecord), registers the spacebar keyboard handler, and calls EO.notifyChange("userSettings")
  • The gap: On startup, only the boolean flag is set. The actual voice infrastructure (spacebar listener, audio stream) is only initialized when /voice is explicitly run

Suggested Fix

During session initialization (in nD1() or equivalent startup path), when voiceEnabled === true is loaded from settings, the same voice subsystem initialization that /voice on performs should be triggered — microphone availability check, keyboard handler registration, etc.

Environment

  • Claude Code version: 2.1.68
  • OS: macOS (Darwin 25.3.0, arm64)
  • Installation: Homebrew

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗