-
Notifications
You must be signed in to change notification settings - Fork 10.4k
Azure Foundry tool sessions still fail on 0.118.0 without local payload patching #16916
Description
What version of Codex CLI is running?
codex-cli 0.118.0
What subscription do you have?
Azure Foundry / Azure OpenAI only
Which model were you using?
gpt-5.4 via Azure Foundry
What platform is your computer?
macOS arm64
What terminal emulator and version are you using (if applicable)?
zsh on macOS
What issue are you seeing?
Azure-backed Codex CLI tool sessions are still broken on 0.118.0.
I have a local shell alias named codex-azure, but that alias is only:
codex --profile azure_foundrySo this is not an alias bug. The underlying Azure profile itself is broken for tool-driven sessions.
With direct Azure Foundry configuration, Codex can start a session and even run the first tool call, but the follow-up /responses request fails with Azure:
{
"error": {
"code": "invalid_payload",
"message": "The provided data does not match the expected schema",
"param": "/",
"type": "invalid_request_error",
"details": [],
"additionalInfo": {
"request_id": "22d9b916fade3079190d29139a72da64"
}
}
}In practice, Azure/Codex is not usable for normal interactive repo work unless I put a local patching proxy in front of Azure and mutate the payloads before they go upstream.
That proxy is only a workaround. Without patching, Azure tool use is still broken.
This looks related to #15584 and #14695, but it is still reproducible on 0.118.0.
What steps can reproduce the bug?
- Configure Codex CLI to use Azure Foundry / Azure OpenAI with
wire_api = "responses". - Run Codex with that Azure profile.
- Ask for anything that triggers a shell tool call.
Minimal repro:
codex --profile azure_foundry exec "Run git status --short --branch and summarize the repo state in two sentences."Equivalent local alias repro:
codex-azure exec "Run git status --short --branch and summarize the repo state in two sentences."Observed behavior:
- the shell tool itself runs
- then the next Azure
/responsesrequest fails withinvalid_payload - interactive tool-driven work cannot continue
I also reproduced it in interactive mode by starting Codex and asking it to inspect a repo. As soon as the first tool-backed turn completes, Azure returns schema/payload errors.
What is the expected behavior?
Azure Foundry should accept the tool round-trip and allow Codex to continue the session normally, without requiring a user-side proxy that patches or strips malformed payload items.
Additional information
Relevant local setup details:
codex-azureis just an alias/wrapper forcodex --profile azure_foundry- the bug reproduces with the underlying profile directly, so the alias is not the cause
- direct Azure Foundry endpoint: broken after tool call
- local payload-patching proxy: can partially mask the issue, which strongly suggests Codex is generating Azure-incompatible
/responsescontinuation payloads
This means Azure support is effectively not working out of the box right now for normal tool-using Codex sessions unless users patch around it locally.