mirror of
https://github.com/openai/codex.git
synced 2026-12-02 00:31:03 +00:00
## Why Startup prewarm runs in the session startup trace, while the first turn can run in a separate trace. The first-turn trace needs a way to show which prewarm task it resolved, including when the wait times out. ## What changed Record `startup_prewarm.resolve` at info level under the first-turn span. Capture the startup prewarm span context when scheduling the task and attach it as an OpenTelemetry span link during resolution. If the prewarm span is filtered out, omit the link. ## Testing Check exported spans for first-turn parentage, link behavior with the prewarm span enabled or filtered out, and no second resolution on a later turn. Add a regression test for retaining the link on timeout. GitOrigin-RevId: ef4a19be64ecf145b17527081960e50adca3b92e