voiceEnabled: true in settings doesn't initialize voice recording on startup
Summary
When voiceEnabled: true is set in ~/.claude/settings.json, voice mode appears enabled on startup (the /voice toggle confirms this by printing "Voice mode disabled" on first invocation), but the Space key recording listener is not initialized. Long-pressing Space does nothing until voice is toggled off and back on.
Steps to Reproduce
- Add
"voiceEnabled": trueto~/.claude/settings.json - Start a new Claude Code session
- Hold Space to record — nothing happens
- Type
/voice— output:Voice mode disabled(confirms it was "enabled") - Type
/voiceagain — output:Voice mode enabled. Hold Space to record. - Hold Space — now it works
Expected Behavior
When voiceEnabled: true is persisted in settings, the voice recording listener should be fully initialized on session startup, so holding Space works immediately without needing to toggle.
Root Cause Hypothesis
The voiceEnabled setting correctly restores the boolean state on startup, but the code path that registers the Space key listener (stdin keypress handler) only runs inside the /voice toggle handler — not during the startup initialization. The setting sets the flag without triggering the side effect.
Environment
- Claude Code version: 2.1.76
- Platform: WSL2 (Linux 6.6.87.2-microsoft-standard-WSL2)
- Shell: bash
- OS: Windows 11 via WSL2
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗