VS Code extension returns invalid_request_error: request body JSON parse error (“Expected end of string… reached end of data”)
Resolved 💬 3 comments Opened Feb 27, 2026 by jgador Closed Feb 27, 2026
💡 Likely answer: A maintainer (github-actions[bot], contributor)
responded on this thread — see the highlighted reply below.
What version of the IDE extension are you using?
0.4.78
What subscription do you have?
API
Which IDE are you using?
VS Code
What platform is your computer?
Microsoft Windows NT 10.0.26200.0 x64
What issue are you seeing?
When using the Codex CLI through the VS Code extension, the request fails with an API error indicating the server could not parse the request body as JSON. Error message: { "error": { "type": "invalid_request_error", "message": "Failed to parse request body as json with error: \u0027c\u0027 is invalid after a value. Expected either \u0027,\u0027, \u0027}\u0027, or \u0027]\u0027. LineNumber: 0 | BytePositionInLine: 81178." } }
What steps can reproduce the bug?
- Open VS Code.
- Open a project folder
- Use the VS Code extension (e.g., run a prompt/command via the Codex panel).
- Submit any prompt (occurs consistently; also reproduced with a minimal prompt).
- Observe the request fails and returns the JSON parse error shown above.
What is the expected behavior?
_No response_
Additional information
The extension should complete the request successfully.
3 Comments
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
We're tracking this issue in #12916.
Are you using an Azure-hosted model?
@etraut-openai I'm using Azure-hosted model gpt-5.3-codex. So I can confirm that this is only an issue with Azure-hosted model. I tried my OpenAI API subscription and it worked.