C:/Program Files/Git/voice requires two invocations on session start — cold-start race condition

Resolved 💬 3 comments Opened Mar 22, 2026 by Silas7458 Closed Mar 26, 2026

Summary

/voice must be called twice to activate voice mode. The first call reports the module as "unloaded" and "disconnected," while the second call (seconds later) connects successfully. This happens consistently on every new session.

Steps to Reproduce

  1. Start a new Claude Code session
  2. Type /voice
  3. Observe output: reports voice as unloaded/disconnected
  4. Type /voice again
  5. Voice mode activates successfully

Expected Behavior

A single /voice invocation should initialize the audio subsystem and establish the connection before returning status — or automatically retry if the initial connection isn't ready yet.

Actual Behavior

The first /voice triggers the lazy load of the voice module but returns status before the WebSocket/audio connection is established. The module is loaded into memory but not connected. A second /voice finds the module already initialized and connects immediately.

Impact

  • Users who configure /voice in startup hooks (SessionStart) hit this every session — the hook fires but voice doesn't actually enable
  • Manual workaround (typing /voice twice) works but shouldn't be necessary
  • For users who want voice-on-by-default, this creates friction every session

Suggested Fix

Either:

  1. Await connection/voice should wait for the audio subsystem to fully initialize before returning status (with a reasonable timeout)
  2. Auto-retry — If the module reports disconnected on first load, automatically retry the connection after a short delay (e.g., 500ms)
  3. Eager load option — A config setting (e.g., "voice.autoEnable": true in settings.json) that initializes voice during session startup before any user interaction

Environment

  • OS: Windows 11 Pro 10.0.26200
  • Claude Code: latest (CLI)
  • Model: Claude Opus 4.6
  • Reproduction rate: 100%

View original on GitHub ↗

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