Skip to content

Make Realtime voice follow-ups reliable#6

Merged
alex-w-99 merged 2 commits into
mainfrom
fix/reliable-realtime-follow-up
Jul 16, 2026
Merged

Make Realtime voice follow-ups reliable#6
alex-w-99 merged 2 commits into
mainfrom
fix/reliable-realtime-follow-up

Conversation

@alex-w-99

Copy link
Copy Markdown
Contributor

Decisions

  • Call completion: Treat the API call lifecycle as authoritative because a media WebSocket can remain open after the remote leg ends.
  • Recovery context: Prefer the persisted call transcript after completion while retaining Realtime transcript events as an immediate fallback.
  • Voice commitments: Keep automatic tool selection, but prohibit claims that work is queued or running unless a handoff tool succeeds.

Changes

  • Finalize voice calls when the socket closes, emits an error, sends a terminal frame, or the call API reports a terminal status.
  • Capture Realtime transcripts and retry fetching the persisted transcript before post-call recovery.
  • Log Realtime function dispatch and strengthen follow-up instructions.
  • Add regression coverage and document the behavior change.

Verification

  • npm test (51 files, 642 tests)
  • npm run typecheck
  • npm run lint
  • git diff --check

@alex-w-99
alex-w-99 marked this pull request as ready for review July 16, 2026 07:02
@alex-w-99
alex-w-99 merged commit 21cff6e into main Jul 16, 2026
15 checks passed
@alex-w-99
alex-w-99 deleted the fix/reliable-realtime-follow-up branch July 16, 2026 07:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants