Repository navigation
fix: reject non-finite numbers in agent tool arguments - #4326
Conversation
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
Reviewed the full change, argument decoding, handler invocation, and sync/async dispatch error paths, including an independent review. No actionable findings. Recursive checks reject non-finite floats in nested JSON objects and arrays, including overflow during decoding, before invoking a local handler. Finite values and integers retain existing behavior, and validation failures use the existing arguments-stage handling and sanitized tool result.
Static review only; no candidate code or local tests executed. Hosted CI at review time: 11 successful checks, 9 skipped, and 6 still running; no failures observed.
Hosted CI update (2026-11-24 00:56 UTC): all checks are terminal, with 17 successful and 9 skipped; no failures.
Automated Release PR --- ## [3.59.0](openai/openai-python@v3.58.0...v3.59.0) (2026-11-24) ### Features * **api:** add healthcare model IDs for Responses ([openai#4327](openai#4327)) ([804a9af](openai@804a9af)) ### Bug Fixes * check the agent upload directory after path resolution ([openai#4323](openai#4323)) ([bc02da4](openai@bc02da4)) * redact credential headers on API error requests ([openai#4316](openai#4316)) ([9d7f58e](openai@9d7f58e)) * reject empty webhook signing keys ([openai#4321](openai#4321)) ([dd69803](openai@dd69803)) * reject non-finite numbers in agent tool arguments ([openai#4326](openai#4326)) ([abbd379](openai@abbd379)) * use bearer authentication for beta Realtime sessions ([openai#4317](openai#4317)) ([7596fb8](openai@7596fb8)) ### Documentation * explain how to skip duplicate webhook events ([openai#4325](openai#4325)) ([6805f05](openai@6805f05)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: openai-sdks[bot] <284451331+openai-sdks[bot]@users.noreply.github.com>
Changes being requested
Check decoded beta agent session tool arguments for non-finite floats before invoking a local handler. Both JSON strings and objects use the existing argument error path, including values nested in arrays or objects and numbers that overflow to infinity.
Additional context & links
The sync and async regression tests verify that the handler is skipped and the tool result contains only the standard error. The agent streaming suite had 391 passes and 14 skips. Ruff and ty passed for both files.