Skip to content

Let Codex return structured output - #769

Merged
SaladDay merged 2 commits into
mainfrom
let-codex-return-structured-output
Oct 19, 2026
Merged

SaladDay merged 2 commits into
mainfrom
let-codex-return-structured-output

Conversation

@SaladDay

@SaladDay SaladDay commented Oct 19, 2026 •

Copy link
Copy Markdown
Collaborator

Codex rejected text.format: json_schema, although pinned Codex 0.153.4 has a native per-turn outputSchema (app-server-protocol/src/protocol/v2/turn.rs:242). The declaration now admits it, and the adapter sends the frozen schema unchanged on every root turn/start, including after resume. The native final message is published unchanged.

Native facts, from the pinned source:

  • turn/steer carries no schema and joins the running Turn.
  • Subagent threads do not inherit the schema; only review and guardian delegates set one.
  • serde_json arbitrary_precision is enabled through codex-exec-server, so numbers stay lossless and no binary64 admission check applies.

Checks:

  • Focused tests for internal/harnessconfig/..., apps/daemon/internal/agent/codex and services/core/internal/execution pass.
  • Mutation checks fail as expected: declaration set back to unsupported; OutputSchema removed from turn/start; plan assignment removed; preparation rejection restored.
  • Live run with Codex 0.153.4 and MiniMax-M2.7 over Responses: Codex sent a strict text.format json_schema. MiniMax returned no error but ignored it and answered in prose. That is provider behavior, and the contract now says so, so the capability cell is "Admitted", not "Verified".

View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.

@SaladDay
SaladDay force-pushed the let-codex-return-structured-output branch from 49d631e to 2164ccb Compare October 19, 2026 06:15
@blacksmith-sh

blacksmith-sh Bot commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

Found 3 test failures on Blacksmith runners:

Failures

Test View Logs
github.com/MiniMax-AI/OpenAgentCore/services/core/internal/api/
TestAgentConfigurationLocalLimitsKeepCodes
View Logs
github.com/MiniMax-AI/OpenAgentCore/services/core/internal/api/
TestTextConfigurationHTTP
View Logs
github.com/MiniMax-AI/OpenAgentCore/services/core/tests/integration/
TestAgentConfigurationValidationRejectsWithoutWritesPostgres
View Logs

Fix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.

Declare structured output for Codex and send the frozen schema as the native outputSchema on every root turn/start. The native strict handling, provider errors and final message text pass through unchanged.
@SaladDay
SaladDay merged commit bda4dd0 into main Oct 19, 2026
25 checks passed
@SaladDay
SaladDay deleted the let-codex-return-structured-output branch October 19, 2026 06:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant