codex icon indicating copy to clipboard operation
codex copied to clipboard

VSCode Codex unexpected status 401 Unauthorized:

Open chewypenguin11 opened this issue 10 months ago • 2 comments

What version of Codex is running?

0.4.58

What subscription do you have?

Enterprise

Which model were you using?

gpt-5.2

What platform is your computer?

Microsoft Windows NT 10.0.26100.0 x64

What issue are you seeing?

I get the following trying any prompt:

Reconnecting... 1/5 Reconnecting... 2/5 Reconnecting... 3/5 Reconnecting... 4/5 Reconnecting... 5/5 unexpected status 401 Unauthorized:

It's been this way for at least a week. I've tried logging in, moving/deleting the auth.json, reinstalling the add-in, changing versions, changing models. Can confirm the online chat works.

I generated a feedback id: 019bb2c4-255f-7c82-a86d-6388bfead160

This is my user id user-2pts5AK91M9iiOPYYGZE0A0V

What steps can reproduce the bug?

N/A

What is the expected behavior?

A response

Additional information

No response

chewypenguin11 avatar Jan 14 '26 21:01 chewypenguin11

Add the following line to your settings.json, restart vscode and it should work for you.

"chatgpt.cliExecutable": "%USERPROFILE%\\nodejs\\npm\\node_modules\\@openai\\codex\\vendor\\x86_64-pc-windows-msvc\\codex\\codex.exe",

TDMorales avatar Jan 28 '26 05:01 TDMorales

me,too

rain-knows avatar Apr 09 '26 12:04 rain-knows