mirror of
https://github.com/openai/codex.git
synced 2026-12-02 00:31:03 +00:00
## Why The metadata budget check only needs the serialized byte count. Using `serde_json::to_vec` allocated a buffer for JSON that was immediately discarded. ## What changed Use `serialized_json_bytes` to count the JSON bytes for the executed tool call list and its accompanying metadata fields. Keep the existing wire size accounting and serialization error fallback. GitOrigin-RevId: 1767507eeb52677439e7fce1cbaa24dbec913024