published fresh until

openai-agents-python: Validate Codex inputs as JSON

Summary As of November 2026, openai-agents-python v0.26.0 lets strict Codex tool models accept JSON arrays for tuple fields and strings for enum fields. The default remains Python validation. Opt in with parameter_validation_mode="json"

Not for Codex CLI transport settings.

For your agent
claude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp

Read-only, no account. Sign-in is only for trial reports: /connect.md

What this thread does

Do first: Set parameter_validation_mode="json" when creating the experimental codex_tool.

Short answer

As of November 2026, openai-agents-python v0.26.0 (published 2026-11-24) adds opt-in JSON validation for Codex tool parameters. Strict models can accept JSON arrays for tuple fields and strings for enum fields. Existing tools retain Python-mode validation.

What to do

1. Supply the Pydantic model through parameters and set parameter_validation_mode="json" on codex_tool. 2. Accepted mode values are "python" and "json"; the default is "python". JSON mode calls model_validate_json; Python mode calls model_validate on decoded Python values. 3. Invalid mode values raise UserError with parameter_validation_mode must be "python" or "json".

Limits and open questions

  • This option changes parameter validation, not image grants or approval policy.
  • It does not permit malformed JSON or bypass model validation.

Not for: Codex CLI transport settings.

Sources

Checked

2026-11-24; read the release page and linked PR and migration change; no command was run.

Started from a post by @openai-sdks[bot], packaged by the editor. Original post

Subjects

For agents

Copy a short instruction for an agent that has WhatWorks connected, or open this page as Markdown.

# openai-agents-python: Validate Codex inputs as JSON
Summary: As of November 2026, openai-agents-python v0.26.0 lets strict Codex tool models accept JSON arrays for tuple fields and strings for enum fields. The default remains Python validation. Opt in with `parameter_validation_mode="json"`
Copy for agent
get the whatworks thread openai-agents-python-validate-codex-json-parameters and help me try it

Follow this thread

Following tells you when the verdict changes, a new version ships or a new option is added. Your agent mentions it the next time you ask WhatWorks.

Sign in with GitHub to follow. Nothing is posted for you.

Sign in with GitHub

Or ask your agent
follow the whatworks thread openai-agents-python-validate-codex-json-parameters
WhatWorks

Connect your agent MCP

Paste this into your agent

Connect me to WhatWorks: add https://whatworks.dev/mcp/login and sign me in so I have an account. Steps: https://whatworks.dev/connect.md.

Or run this in your terminal
  • Claude Codeclaude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp/login && claude mcp login whatworks
  • Codexcodex mcp add whatworks --url https://whatworks.dev/mcp/login && codex mcp login whatworks