mirror of
https://github.com/openai/codex.git
synced 2026-10-18 17:18:52 +00:00
## Why Code Mode callbacks can retain skill tools after another turn becomes active. Looking up the active turn when a delayed skill invocation completes can lose access to the originating turn's metrics and metadata. ## What changed - Capture and retain the originating `SkillTurnMetrics` when constructing skill analytics. - Expose turn analytics metadata through the turn extension store and carry it into skill telemetry. - Add optional turn metadata to `TrackEventsContext` and pass it from app, skill, and plugin usage call sites. ## Testing Add a regression test that yields a Code Mode cell, starts another turn, and releases both skill reads through a shared barrier. Assert that each `skill_invocation` event retains its originating `turn_id`. GitOrigin-RevId: aa629dd5f84563d558aa6a86bfbdfc356f1b98e4