mirror of
https://github.com/openai/codex.git
synced 2026-12-03 00:41:03 +00:00
## Why The first turn could spend up to five seconds waiting for the workspace attribution setting. Starting the request during thread initialization lets it overlap with MCP startup. ## What changed Fetch the policy in the background for threads using Codex backend authentication. Reuse the pending lookup on the first turn when it matches the thread's current authentication generation, and cancel any unclaimed lookup on thread shutdown. Cache a disabled policy after a timeout until its retry deadline. Once the deadline passes, the next lookup can fetch the setting again. ## Testing The app-server test waits for the settings request before starting the first turn. The extension test covers retry deadlines across turns for both prefetched and cached policies. GitOrigin-RevId: 6f66f6299b56affc6c95558c94381e476a5cc1d8