mirror of
https://github.com/openai/codex.git
synced 2026-09-07 15:40:00 +00:00
## Why Event subscriptions may need to outlive the MCP runtime associated with a task. ## What changed - Add `McpEventStreamOpener`, which retains the hosted Apps MCP connection settings and opens each event stream with an independent client. - Keep subscription cancellation tied to account changes and removal of the task's event server, including when cancellation ownership is forwarded across runtime replacement. - Expose the opener and cancellation forwarding through `McpResourceClient`. ## Testing Add an HTTP transport test that shuts down the runtime, refreshes credentials for the same account, and verifies that a new event stream connects with the current authorization and receives notifications. GitOrigin-RevId: e102aa382e63121661ff0567f7523515e459922d