mirror of
https://github.com/openai/codex.git
synced 2026-12-03 00:41:03 +00:00
## Why JSON escaping can make a shorter tool output field consume more of the evidence byte budget than a longer field. Ranking by raw string length can truncate the build log while preserving a quote-heavy field that takes up more space. ## What changed When a Guardian response item exceeds the evidence budget, trim its text fields in descending order of serialized JSON byte size. ## Testing Extend the inbox truncation test to verify that a quote-heavy tool result field is truncated while the build log and error summary stay intact. GitOrigin-RevId: de78c768e54e0fb020205aa5be14a9b6b3e8c1c9