[BUG] Voice mode: transcribed text silently not injected on Linux kernel 6.2+

Resolved 💬 3 comments Opened Mar 25, 2026 by nervousapps Closed Apr 19, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

Voice mode: transcribed text silently not injected on Linux kernel 6.2+

Claude Code version: 2.1.83
Platform: Linux (kernel 6.17.0-19-generic)
Terminal: VTE 0.76.0 (GNOME Terminal / Tilix)

### Description

Voice mode records audio and transcribes correctly, but the transcribed text is never injected into the input field. No error is shown to the user — it silently fails. Pressing Enter after
releasing Space submits an empty message.

### Root cause (suspected)

Claude Code appears to use the TIOCSTI ioctl to stuff transcribed text into the terminal's input queue. This ioctl was deprecated and disabled by default in Linux kernel 6.2
(CONFIG_LEGACY_TIOCSTI=n) as a security measure. On kernel 6.17, the call silently returns without injecting anything.

Reference: https://man7.org/linux/man-pages/man4/tty_ioctl.4.html

### Suggested fix

Replace TIOCSTI-based injection with a kernel-compatible alternative, such as writing directly to the pty master file descriptor, or using xdotool/libxdo on X11 as a fallback.

### Related issues

These issues were checked and are not duplicates — they describe different failure modes:

  • #36748 — Voice mode doesn't initialize on startup (types spaces instead of recording); initialization bug, not injection failure
  • #38648 — Transcription silent on macOS 2.1.81–2.1.83; macOS-only regression, unrelated to kernel
  • #13183 — CLI hangs on paste from external voice-to-text tools; bracketed paste bug, not built-in voice mode
  • #31461 — Voice doesn't work in plan edit mode; mode-specific, not kernel-level

What Should Happen?

Transcribed text should appear in the input field after releasing Space, or a user-facing error should be shown if injection fails.

Error Messages/Logs

The full pipeline succeeds up to injection:                                                                                                                                                 
                                                                                                                                                                                            
  [voice] handleKeyEvent: idle, starting recording session immediately                                                                                                                        
  [voice_stream] WebSocket connected                                                                                                                                                        
  [voice_stream] TranscriptText: "Do you hear me?"                                                                                                                                            
  [voice] onTranscript: isFinal=true text="Do you hear me?"                                                                                                                                   
  [voice] Final transcript assembled (15 chars): "Do you hear me?"                                                                                                                            
  [voice] Injecting transcript (15 chars)                                                                                                                                                     
                                                                                                                                                                                              
  After `Injecting transcript`, there are no further voice-related logs — no confirmation, no error, no subsequent API call. The input field remains empty. This was reproduced across        
  multiple recordings in the same session.

Steps to Reproduce

  1. Enable voice mode with /voice
  2. Hold Space to record, speak something, release Space
  3. Transcription completes successfully (visible in debug log)
  4. Nothing appears in the input field; pressing Enter submits an empty message

Claude Model

Sonnet (default)

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

2.1.83

Platform

Anthropic API

Operating System

Ubuntu/Debian Linux

Terminal/Shell

Other

Additional Information

_No response_

View original on GitHub ↗

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