mirror of
https://github.com/openai/codex.git
synced 2026-11-21 22:50:37 +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
codex-protocol
This crate defines the "types" for the protocol used by Codex CLI, which includes both "internal types" for communication between codex-core and codex-tui, as well as "external types" used with codex app-server.
This crate should have minimal dependencies.
Ideally, we should avoid "material business logic" in this crate, as we can always introduce Ext-style traits to add functionality to types in other crates.