[FEATURE] Streaming response hook for external voice and accessibility integrations
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
Claude Code's only response exit point is the Stop hook, which fires after a full response completes. There is no way for an external tool to receive response tokens as they stream.
I built a browser-based voice interface for Claude Code: push-to-talk mic → transcript injected into active Claude Code session → Stop hook captures the completed response → browser speaks it back. The pipeline works, but every exchange takes 30-60 seconds of silence before the browser receives anything. The full response must finish before a single word exits.
For accessibility users who rely on voice as their primary input method, this latency makes Claude Code's local context -- its greatest strength -- effectively unusable in a voice workflow.
Proposed Solution
A PostResponseChunk hook that fires as tokens are generated, delivering partial response text to an external process in real time.
Or a local SSE endpoint from the Claude Code process that external tools can subscribe to and receive streaming output.
Either would allow a browser, voice UI, or accessibility tool to display and speak Claude Code's response as it generates -- the same experience users currently get visually in the terminal.
Alternative Solutions
I built the Stop hook workaround described above. It proves the pipeline is sound but the latency is architectural -- there is no way to make it faster without streaming output.
Other tools (OpenAI Realtime API, Gemini Live) solve this with voice-to-voice streaming at the model level. Claude Code cannot use that approach because it would lose local project context, file access, and tool calls -- the entire reason to use Claude Code over a raw API.
Priority
Critical - Blocking my work
Feature Category
Developer tools/SDK
Use Case Example
USE CASE EXAMPLE:
- Developer with a motor disability uses voice as their primary input method
- They speak a question about their codebase into a browser interface
- The transcript is injected into the active Claude Code session
- Claude Code answers using full local project context, memory, and tools
- With streaming: the browser begins speaking the response within 1-2 seconds
- Without streaming: the browser waits 30-60 seconds in silence, then plays the full response at once
The difference between step 5 and step 6 is the difference between a usable tool and an unusable one.
Additional Context
Existing issue #61574 asks for TTS readback inside Claude Code. This request is different -- it asks for an output hook so external tools can build their own integrations. The hook approach is more flexible: it enables voice UIs, live dashboards, remote displays, and any accessibility tool without Anthropic having to build each one.
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗