mirror of
https://github.com/openai/codex.git
synced 2026-10-27 18:48:37 +00:00
## Why MCP completion events can truncate large results and omit content removed for model consumption. Rollout traces need the original response, including content and metadata, as well as results for calls denied before reaching the backend. ## What changed - Record MCP runtime results before callbacks, content filtering, and UI truncation, and record skipped calls as failures. - Stop deriving MCP runtime completion records from protocol events to avoid duplicate records. - Treat MCP runtime payloads as opaque results when reducing agent interactions. - Buffer JSON trace writes and explicitly flush them. ## Testing Extend app-server tests to verify that traces retain oversized MCP text, audio, structured content, and metadata while UI results remain truncated, and that denied calls produce exactly one failed runtime result with the denial reason. GitOrigin-RevId: 57880770545eb5869420d7dc6fa4a15e481cae9d