Skip to content

berd-call: recover a Spokesperson session lost during an input reset - #412

Closed
johnmatthewtennant wants to merge 1 commit into
mainfrom
jtennant/berd-call-reset-session-loss
Closed

johnmatthewtennant wants to merge 1 commit into
mainfrom
jtennant/berd-call-reset-session-loss

Conversation

@johnmatthewtennant

@johnmatthewtennant johnmatthewtennant commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

Summary

If the Spokesperson's Realtime session was lost or expired while an input reset (muting, or clearing what you'd said) was waiting for OpenAI to confirm its clear, the call ended with Spokesperson runtime is closed. A session lost at any other moment starts a replacement and the call carries on.

The lost session takes its input buffer with it, so its outstanding clears no longer need confirming. When its session-lost or expiry event arrives, those clears count as done, the waiting mute or reset is answered, and recovery starts a replacement session as it does otherwise. Until then a clear whose session has ended just waits, so a runtime that fails outright still ends the call through its failure event.

Related issue

None.

Testing

  • New test: an input reset waiting on a session that is then lost stays pending without failing, and is answered once the session's end is handled. Before the change, the first check after the loss failed with Spokesperson runtime is closed.

  • Not exercised through the realtime host loop or a live call. The test covers the input-reset tracking that the session-lost and expiry handler now calls first.

When the Realtime session was lost or expired while an input reset was
waiting on the provider's confirmation, the call ended with
"Spokesperson runtime is closed" instead of starting a replacement
session. The lost session takes its input buffer with it, so treat its
outstanding clears as done once its terminal event arrives, answer the
waiting input controls, and let recovery proceed.

Signed-off-by: John Tennant <jtennant@block.xyz>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@johnmatthewtennant

Copy link
Copy Markdown
Contributor Author

🤖 Folded into #416 for review and merge.

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.

1 participant