Files
codex/codex-rs/ext
Ben Romano ba4148faaf Continue MCP callback traces into Guardian reviews (#65254)
## 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
2026-12-02 13:21:09 +00:00
..