mirror of
https://github.com/openai/codex.git
synced 2026-08-23 13:09:46 +00:00
## Why Compact JSON arrays can expand into millions of heap values during decoding, and duplicate object keys make a message ambiguous. ## What changed - Limit exec-server JSON-RPC messages to 256K JSON values and reject duplicate object keys. - Cap `fs/read_directory` results and retained `process/read` output at 50,000 entries or chunks so locally produced responses remain within the decoder budget. ## Testing Add coverage for all JSON-RPC variants, large scalar payloads, duplicate keys, compact array amplification, and retained process output at the chunk limit. GitOrigin-RevId: e31d1f25ab0a7e2272015c98174fd2b7cdd669d7