#5499: fix(voice-call): wait for session creation before sending config update
channel: voice-call
agents
Cluster:
Voice Call and TTS Improvements
Closes #5243
The OpenAI Realtime API requires waiting for the transcription_session.created event before sending transcription_session.update. Previously, the update was sent immediately on WebSocket open, causing 'Missing required parameter: session' errors.
Changes:
- Wait for transcription_session.created before sending session config
- Track sessionReady state to prevent sending audio before session is configured
- Add pendingSessionConfig flag to handle the initialization sequence
- Remove DefaultResourceLoader usage (no longer exported from pi-coding-agent)
<!-- greptile_comment -->
<h2>Greptile Overview</h2>
<h3>Greptile Summary</h3>
This PR updates the OpenAI Realtime STT provider to follow the Realtime API’s init handshake by deferring `transcription_session.update` until after `transcription_session.created`, and gates audio sends until the session is configured. It also updates the embedded runner codepaths to stop constructing a `DefaultResourceLoader` (no longer exported) and instead pass `additionalExtensionPaths` and the computed `systemPrompt` directly into `createAgentSession`.
<h3>Confidence Score: 4/5</h3>
- Generally safe to merge; main remaining risk is an edge-case where the session may never become ready and audio is silently dropped.
- The changes are localized and align with the Realtime API’s required event ordering, and the embedded runner refactor matches the local type augmentation for `additionalExtensionPaths`. The primary concern is that readiness is now contingent on receiving `transcription_session.updated`; if that event is missed or fails, the session stays non-ready and audio is dropped without surfacing an error.
- extensions/voice-call/src/providers/stt-openai-realtime.ts
<!-- greptile_other_comments_section -->
<!-- /greptile_comment -->
Most Similar PRs
#7535: fix(voice-call): queue realtime transcript waiters
by hclsys · 2026-02-02
80.6%
#6677: fix(tts): always load fresh config for voice selection
by Jinqiao · 2026-02-01
75.9%
#19073: feat(voice-call): streaming TTS, barge-in, silence filler, hangup, ...
by odrobnik · 2026-02-17
75.4%
#10447: feat(voice-call): add Deepgram STT provider
by chrharri · 2026-02-06
74.4%
#8251: fix(voice-call): remove redundant transcript from extraSystemPrompt
by geodeterra · 2026-02-03
73.8%
#12597: voice-call: add Asterisk ARI provider + core STT
by w0s1nsk1 · 2026-02-09
73.3%
#12717: fix: add "audio" to openai provider capabilities
by openjay · 2026-02-09
73.1%
#19489: fix(voice-call): add echo suppression for TTS playback
by kalichkin · 2026-02-17
72.9%
#9085: fix: improve stability for terminated responses and telegram retries
by vladdick88 · 2026-02-04
72.3%
#15792: fix: pass agentId to resolveSessionFilePath in additional call sites
by MisterGuy420 · 2026-02-13
72.2%