mirror of
https://github.com/openai/codex.git
synced 2026-09-09 15:58:47 +00:00
## Why
Passing `undefined` to a tool could fail JSON parsing because V8 stringifies it as the non-JSON text `undefined`.
## What changed
Return no JSON value for JavaScript `undefined`, so explicit `undefined` tool arguments behave like omitted arguments. Attempts to `store` an undefined value report the existing serializability error and preserve the previous stored value.
## Testing
Add regression coverage for storing `undefined` over an existing `null` value, and extend the current-time tool test to cover `{}`, omitted arguments, and explicit `undefined`.
GitOrigin-RevId: 071050ebb2ecc44c8f08453cf8523b4d21728c7e