mirror of
https://github.com/openai/codex.git
synced 2026-12-03 00:41:03 +00:00
## Why When a Node REPL-backed MCP tool requests approval through an elicitation callback, the trace loses the parent-child relationship between the callback and the Guardian review. ## What changed Parent the Guardian review span to the callback span when its `traceparent` is well formed and its trace ID matches the active tool invocation. Preserve the invocation's sampling flags and `tracestate`, and strip both trace fields from the elicitation metadata before it reaches approval handling or user prompts. ## Testing Cover callback span parenting and trace propagation to Guardian inference, including rejection of unrelated trace IDs and malformed headers. Verify that form and URL prompts retain other metadata while dropping trace fields. GitOrigin-RevId: 942b61a0da81b5d549c9f4813b28101bba622a26