@cloudflare/voice@0.3.1

cloudflare/agents@cloudflare/voice@0.3.1Jun 16, 2026by github-actions[bot]

AI Summary

A patch release fixing unhandled rejections that occurred during voice connection teardown.

Key Highlights

  • Fixed fire-and-forget voice lifecycle handlers from leaking unhandled rejections on connection teardown.
  • Implemented a teardown-aware helper to swallow expected connection-teardown errors.
  • Improved error logging for unexpected issues.

Full Release Notes

### Patch Changes

-   [#1754](https://github.com/cloudflare/agents/pull/1754) [`151d457`](https://github.com/cloudflare/agents/commit/151d457d320fccc9852fccbf168edfc54d72d9a3) Thanks [@threepointone](https://github.com/threepointone)! - Stop fire-and-forget voice lifecycle handlers from leaking unhandled rejections
    on connection teardown. The `withVoiceInput` mixin dispatches `start_call`,
    `end_call`, `interrupt`, and transcript emission from the synchronous
    `onMessage` handler without awaiting them, so a client dropping mid-operation
    (e.g. while `keepAlive()`'s alarm write is still in flight) could surface a
    retryable "Network connection lost." rejection. These background tasks now run
    through a teardown-aware helper that swallows expected connection-teardown
    errors and logs anything unexpected.