Skip to content

fix(talkio): Harden provider interruption handling#1

Merged
abdufelsayed merged 1 commit into
mainfrom
codex/explore-core-package-for-bugs
Apr 28, 2026
Merged

fix(talkio): Harden provider interruption handling#1
abdufelsayed merged 1 commit into
mainfrom
codex/explore-core-package-for-bugs

Conversation

@abdufelsayed

@abdufelsayed abdufelsayed commented Apr 21, 2026

Copy link
Copy Markdown
Owner

Harden provider interruption handling in the core agent.

The agent could still react to callbacks from LLM and TTS providers after a timeout, abort, or replacement. That made duplicate error emissions and stale TTS audio possible, especially when filler speech was interrupted and the real response started. This change tracks settled actor state and correlates TTS events with the active request so only current provider work can affect the turn.

VAD failures now use the same provider error path as STT, LLM, and TTS. Providers can report ctx.error(error), and the machine emits agent:error with source: "vad" while preserving the running session.

I considered only clearing actor refs on interruption, but that does not protect against late callbacks from provider code that keeps running after abort. Request IDs and settled-state guards make the stale callback behavior explicit and testable.

The branch was verified locally with typecheck, tests, lint, format check, and git diff --check after the VAD error callback was wired through the public provider context.

Ignore stale LLM and TTS callbacks after timeout, abort, or replacement so old provider responses cannot leak into the active turn.

Track active TTS request IDs and surface VAD provider errors through the public error event path.

Co-Authored-By: OpenAI Codex <noreply@openai.com>
@abdufelsayed abdufelsayed force-pushed the codex/explore-core-package-for-bugs branch from 958c43c to ff139f6 Compare April 28, 2026 10:26
@abdufelsayed abdufelsayed changed the title Improve actor abort/timeout handling, add TTS request IDs and VAD error events fix(talkio): Harden provider interruption handling Apr 28, 2026
@abdufelsayed abdufelsayed merged commit 46d54d7 into main Apr 28, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant