Voice mode shows 'keep trying' instead of clear error when audio devices unavailable (WSL2)
Bug Description
When using voice mode in Claude Code CLI inside WSL2 (Kali Linux), the voice feature silently fails with a generic "keep trying" message instead of a clear, actionable error explaining that audio devices are unavailable.
Environment
- OS: Kali Linux running in WSL2
- Kernel:
6.6.87.2-microsoft-standard-WSL2 - Platform: Windows + WSL2 (no WSLg audio support configured)
- Claude Code version: latest
Steps to Reproduce
- Run Claude Code CLI inside WSL2 (no WSLg audio configured)
- Run
/voiceto enable voice mode - Hold
Spaceto attempt to record - Observe: generic "keep trying" message appears repeatedly
Expected Behavior
A clear error message such as:
"Voice mode requires audio device access. No audio devices found (/dev/snd/missing). If you're using WSL2, runwsl --update && wsl --shutdownin PowerShell (Admin) to enable WSLg audio support."
Actual Behavior
Voice mode appears enabled but when recording is attempted, it shows "keep trying" with no explanation.
Root Cause
/dev/snd/ does not exist in WSL2 without WSLg. Claude Code does not detect this and surface a helpful diagnostic message.
Suggested Fix
Before activating voice mode (or on first failed record attempt), check for the presence of audio recording tools and /dev/snd/ devices. If unavailable, surface a specific error with WSL2 remediation steps instead of looping with "keep trying".
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗