mirror of
https://github.com/openai/codex.git
synced 2026-10-19 17:28:46 +00:00
## Why The 32 KiB per-result cap and 128 KiB aggregate budget discard tool metadata even when the outgoing request has room to retain it. ## What changed - Remove the per-result capture cap and raise the aggregate executed-tool metadata budget to 2 MiB. - Apply a 15 MiB soft budget to serialized HTTP requests and WebSocket messages, using the actual WebSocket delta. Trim optional result metadata on the wire copy while preserving ordinary content and logical history. - Prioritize `openai/resource_access` metadata during trimming, and include `overage_bytes` in omission markers. - Record bytes removed by metadata budgets in `codex.tool_metadata.shed_bytes`, tagged by stage. ## Testing Add coverage for HTTP and WebSocket message boundaries, resource preservation, residual marker removal, unchanged history, and shedding metrics. Update direct-tool and code-mode tests to verify metadata survives beyond the previous limits. GitOrigin-RevId: ed00996b77945300f60db1e52eff22b4de2707c1