mirror of
https://github.com/openai/codex.git
synced 2026-10-21 14:23:14 +00:00
## Why Classifier requests need to preserve their owning thread's workspace routing and account binding, including when reusing pooled connections or retrying after authentication changes. ## What changed - Share the thread's `WorkspaceRoutingContext` with Guardian v2 and resolve routing before leasing HTTP or pooled WebSocket connections. - Reuse WebSockets only when their connection key and authentication state still match. Cache HTTP transports by URL and redirect policy, rejecting redirects when routing requires it. - Stop classification requests and retries when the account owner changes while allowing token refreshes for the same user and workspace. ## Testing Add regression coverage for routing failures with prewarmed sockets, shared thread routing state, account switches during HTTP and WebSocket requests, same-account token refreshes, and HTTP redirect-policy cache changes. GitOrigin-RevId: 7b3efcadb4797b6a2de2e28e7506b297b0728d69