Voice mode should integrate with VS Code dictation API when running in VS Code terminal or as extension
Feature Request
When Claude Code runs inside a VS Code remote environment (devcontainer, SSH remote, WSL, etc.) — whether as the VS Code extension or as a CLI in the integrated terminal — the current voice mode fails because it requires SoX to have access to an audio input device in the remote environment, which is typically unavailable.
VS Code itself solves this problem: its dictation feature runs on the client side (the local machine), so mic access works regardless of where the remote environment is running. Claude Code could leverage the same approach in both contexts:
- VS Code extension: integrate with VS Code's speech/dictation APIs directly
- CLI in VS Code integrated terminal: detect the
TERM_PROGRAM=vscodeenvironment variable (or similar) and delegate audio capture to the VS Code client rather than shelling out to SoX in the remote process
Suggested approach
Make the audio capture backend configurable, with options such as:
auto(default) — detect context and choose the best available backendsox— current behavior, direct SoX recording in the local shell environmentvscode— delegate to VS Code's dictation/speech API via the extension host
This would allow users in remote/container environments to opt into the VS Code-backed mode explicitly, even in edge cases where auto-detection may not work.
Current behavior
- Voice mode requires
soxinstalled in the remote environment with access to an audio input device - Holding Space does nothing in a devcontainer — no audio device is accessible inside the container
- No clear error or fallback is provided
Expected behavior
- Voice mode works in devcontainers and other remote environments when running inside VS Code (extension or integrated terminal)
- Audio is captured on the local VS Code client, matching how VS Code's own dictation works
- Falls back to SoX-based recording when running as a standalone CLI outside of VS Code
Environment
- Claude Code CLI running in a VS Code integrated terminal inside a devcontainer
- Docker Desktop for Mac
- VS Code built-in dictation works fine in the same environment
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗