[FEATURE] Support voice mode in WSL2 with WSLg audio

Resolved 💬 4 comments Opened Mar 9, 2026 by mgiovani Closed Apr 11, 2026

Preflight Checklist

  • [x] I have searched existing requests and this feature hasn't been requested yet
  • [x] This is a single feature request (not multiple features)

Problem Statement

Voice mode is currently blocked in WSL (Windows Subsystem for Linux) with a hardcoded platform check that returns: "Voice mode is not supported in WSL (Windows Subsystem for Linux) because audio devices are not available. To use voice mode, run Claude Code in native Windows instead."

This blanket block was reasonable when WSL had no audio support, but modern WSL2 with WSLg provides fully functional audio input via PulseAudio over RDP. The microphone works — arecord and parec both capture audio successfully from the RDPSource — yet Claude Code refuses to even attempt voice mode.

Many developers use Claude Code exclusively through WSL2 and cannot easily switch to native Windows just for voice.

Proposed Solution

Instead of blocking all WSL environments, check if audio recording is actually available (e.g., test if arecord or rec can open the default capture device). If audio works, allow voice mode regardless of the WSL detection.

Alternatively, add a setting like "forceVoiceMode": true to let users opt in when they know their WSL2 audio works.

Alternative Solutions

  • Running Claude Code natively on Windows — but this means losing the full Linux dev environment
  • The WSLg PulseAudio bridge works with libasound2-plugins and a simple ~/.asoundrc config:

``
pcm.!default { type pulse }
ctl.!default { type pulse }
`
This routes ALSA through PulseAudio to WSLg's RDP audio, which forwards the Windows microphone. Verified working with
arecord -f S16_LE -r 16000 -c 1 -t raw -q -` producing valid audio data.

Priority

Medium - Would be very helpful

Feature Category

Interactive mode (TUI)

Use Case Example

  1. Developer runs Claude Code in tmux inside WSL2 on Windows
  2. WSL2 has WSLg enabled with working microphone via RDP audio redirection
  3. Developer wants to use voice mode for hands-free coding
  4. Currently blocked by platform check despite audio hardware being fully functional
  5. With this fix, developer could hold Space to dictate prompts naturally

Additional Context

  • Environment: WSL2, Ubuntu 24.04, WSLg with PulseAudio, Claude Code v2.1.71
  • Windows microphone privacy settings allow access (confirmed via Remote Desktop in mic access list)
  • PULSE_SERVER=unix:/mnt/wslg/PulseServer is set automatically by WSLg
  • Required packages: libasound2-plugins, alsa-utils (usually pre-installed)
  • The RDPSource PulseAudio source successfully captures Windows microphone audio
  • The WSL check was found in the compiled binary: if(iA()==="wsl") return {available: !1, reason: "Voice mode is not supported in WSL..."}

View original on GitHub ↗

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