turn/start flow owned by the gateway:
- The client starts a voice session with minimal routing context.
- The client streams microphone PCM chunks over the WebSocket binary channel.
- The client finalizes with frozen composer context.
- The gateway transcribes audio.
- The gateway prepends the transcript as
UserInput::Textand starts the normal turn. - Clients render the result from existing turn and timeline notifications.
Methods
Notifications
voice/session/result does not carry transcript text. A successful transcript is visible through the normal turn/started, user-message, item, and timeline notifications for the created turn.
Status
voice/status can be scoped by workspace:
VoiceStatus values are:
Starting a session
voice/session/start uses a minimal VoiceSessionStartContext so capture can begin without waiting for all non-audio composer preparation:
workspace_id, thread_id, and turn_id are present and that the audio format matches the streaming target.
Audio format
The initial streaming contract is microphone PCM only:pcm_f32le is reserved in the enum for future adapters. The current streaming gateway contract accepts only pcm_s16le.
Binary audio chunks
Audio chunks are sent as WebSocket binary frames, not JSON-RPC requests. Each frame uses theVOC1 envelope:
VoiceChunkFrameHeader contains:
The frame header must not carry workspace, thread, turn, attachments, capabilities, text input, or permission data. Non-audio context belongs to finalize.
When a chunk is accepted, the gateway can publish:
Finalizing
Finalize commits the voice session and supplies the frozen non-audio composer context:VoiceTurnContext can carry the same non-audio turn material as a normal composer send: prepared attachments/artifact references, capabilities, model, provider, thread mode, execution backend, reasoning, permission profile, and CLI runtime options.
It must not contain the future transcript. The gateway owns transcription and inserts the transcript when it starts the turn.
Response:
voice/session/result.
Result
Terminal outcomes are:
Example:
turn_started, clients should render the new work from normal turn notifications plus thread timeline-page and turn work-page APIs. For cancelled and no_speech, clear the voice composer state without creating a message.
Cancelling
voice/session/result with outcome cancelled.
Permissions
Voice has two permission layers:
Do not map microphone permission prompts to
turn/permission/request/respond. Agent permission prompts still use the normal turn permission API after the voice-created turn starts.
Generated schemas
/schemas/voice_status.json/schemas/voice_status_params.json/schemas/voice_status_response.json/schemas/voice_audio_encoding.json/schemas/voice_audio_format.json/schemas/voice_chunk_frame_header.json/schemas/voice_chunk_ack_notification.json/schemas/voice_error.json/schemas/voice_error_kind.json/schemas/voice_turn_context.json/schemas/voice_session_start_context.json/schemas/voice_session_start_params.json/schemas/voice_session_start_response.json/schemas/voice_session_finalize_params.json/schemas/voice_session_finalize_response.json/schemas/voice_session_cancel_params.json/schemas/voice_session_cancel_response.json/schemas/voice_session_outcome.json/schemas/voice_session_result_notification.json/schemas/client/prepare_voice_composer_snapshot_request.json/schemas/client/prepared_voice_composer_snapshot.json/schemas/client/voice_composer_lock_state.json/schemas/client/voice_composer_snapshot_discard_reduction.json/schemas/client/voice_finalize_response_reduction.json/schemas/client/voice_finalize_ui_action.json/schemas/client/voice_session_result_reduction.json
Related pages
- Turns API explains normal turn creation and permission profiles.
- Client Architecture explains the shared Rust client core and mobile shell boundary.
- Permission System explains agent permission profiles and turn sandbox/resource policy.