mirror of
https://github.com/openai/codex.git
synced 2026-10-23 17:48:28 +00:00
## Why Guardian sampling uses a pool of WebSockets, while the bridge routes each connection by thread ID. Each socket therefore needs its own identity instead of reusing the source thread ID across the pool. ## What changed - Generate a classifier thread ID for every pooled connection and use it for request, window, and subagent attribution. - Preserve the originating thread ID in turn metadata alongside the Guardian classifier request kind. - Build request metadata after leasing a connection so retries use the identity of the socket that carries the request. ## Testing - Cover unique identities across pooled and replacement connections. - Verify classifier attribution metadata for extension requests and retries. GitOrigin-RevId: 1c36207125157ff05cab9487a2fa37bf85e5fdd8