invalid_request_error Failed to parse request body as json with error: Expected end of string, but instead reached end of data. LineNumber: 0 | BytePositionInLine:

Open 💬 9 comments Opened Feb 26, 2026 by ssanchezemais
💡 Likely answer: A maintainer (etraut-openai, contributor) responded on this thread — see the highlighted reply below.

What version of Codex CLI is running?

codex-cli 0.105.0

What subscription do you have?

Azure AI Foundry

Which model were you using?

gpt-5.3-codex

What platform is your computer?

Microsoft Windows NT 10.0.26200.0 x64

What terminal emulator and version are you using (if applicable)?

Windows Terminal (PowerShell)

What issue are you seeing?

■ {
"error": {
"type": "invalid_request_error",
"message": "Failed to parse request body as json with error: Expected end of string, but instead reached end of data. LineNumber: 0 | BytePositionInLine: 89182."
}
}

<img width="1035" height="304" alt="Image" src="https://github.com/user-attachments/assets/ea1ddba1-83f1-47dc-98ba-66a6821962e6" />

What steps can reproduce the bug?

After a few seconds in planning mode with the new GPT-5.3-Codex model in Azure AI Foundry, I consistently get this error:

■ {
"error": {
"type": "invalid_request_error",
"message": "Failed to parse request body as json with error: Expected end of string, but instead reached end of data. LineNumber: 0 | BytePositionInLine: 89182."
}
}

<img width="1028" height="304" alt="Image" src="https://github.com/user-attachments/assets/ff98b751-365c-48fa-bca3-5c234ae977c1" />

At first it looks like it’s working, because it starts reading AGENTS.md and other files, but after a while it throws that error. The BytePositionInLine value changes on every attempt.

What is the expected behavior?

Planning mode executes successfully

Additional information

_No response_

View original on GitHub ↗

9 Comments

ssanchezemais · 4 months ago

In codex 0.104.0 works fine.

Ayazzia01 · 4 months ago

I get the same error.
I use codex extension in vscode and updated the extension. It started breaking.

etraut-openai contributor · 4 months ago

Thanks for the bug report, but there's not enough information for us to diagnose. If you see this again, please use the /feedback command to upload the session details and include the thread ID in the bug report. That will allow us to investigate further.

This looks like it might be an Azure-specific problem. The Azure team uses the same implementation of the "responses" endpoint as OpenAI, but they often take a week or two to integrate the latest changes. These lags can result in problems similar to this one. You might want to report this to the Azure team.

@Ayazzia01, are you using an Azure-hosted model as well?

jgador · 4 months ago

@etraut-openai I'm using gpt-5.3-codex in Azure foundry.

etraut-openai contributor · 4 months ago

This is likely an issue with the Azure responses endpoint. Please report the problem to the Azure folks.

jgador · 4 months ago

@etraut-openai It worked perfectly fine yesterday. It's probably with the VS code extension new release or the CLI new release.

jgador · 4 months ago

@etraut-openai You're correct, I used my OpenAI API subscription and it worked. Can you please tell us where to report this?

Ayazzia01 · 4 months ago

@etraut-openai
Hey, yes I used Azure Foundry endpoint. Will raise this with them.
Thanks.

eavidal · 4 months ago

Same issue here with Azure Foundry + VSCode Codex extension