Codex Requests Failing in Xcode 26.5 and Xcode 27 Beta

Hi everyone,

Since today, all my Codex requests have been failing in both Xcode 26.5 and Xcode 27 beta.

The Codex integration appears to be connected and authenticated correctly, but every request fails immediately with the error shown in the attached screenshot.

Error message:

The data couldn’t be read because it isn’t in the correct format.

Accepted Answer

I fixed this problem by logging out from codex / OpenAI and using an API key instead.

Before I tried to reinstall the codex agent (via Xcode) I also deleted the whole ~/Library/Developer/Xcode/CodingAssistant folder. But nothing helped.

@patrick You can also try deleting the items in your Keychain named "Codex ___" and let us know if that helps. We'll look into improving the error messages here.

@Engineer no this didn't work. I removed every keychain entry named Codex* (had a few of them in my keychain). After that I reopened Xcode and signed in via my OpenAI account. Same problem again. So I switched back to the API key, which works again without problems.

✮Update - the config file points to our keychain, so the auth.json file is only temporary, so it was def a fluke... and did not last after logging out of the terminal. either that or the auth connection I did get dropped after x time.. -but maybe this is still enough for someone to see something I am not and get a proper workaround... ✮

(original post) None of this worked for me either, and as a Pro Account holder, I did not want to just use the API and pay more. I did find a work around. logging in with the account still is broken, but, after searching my files, I noticed I did not have an auth.json file

go into terminal and search it: ls -la ~/.codex

you should have a config.toml and auth.json file ( I only had config) to fix that, I launched codex from my terminal, and today there was an update, so I updated codex to the latest and after I logged out of the terminal, the auth.json file was now there.

next I just went to Xcode settings, Agents, Codex and used the auth with config file option. now that I had the auth.json file in my folder, it was using that as my login for the pro account and not using the API - I checked the codex app to see my limits, and on top of that my API balance is zero now.

anyway, maybe its a fluke and I got lucky, or maybe I found something, either way, I hope it works for someone else in the meantime. Cheers all.

Sadly, I too am suffering this exact same issue. I would prefer to have the standard authentication option to be working as I do not have access the Codex API key. I am still able to work with Xcode 26 & Tahoe but my dev environment is running macOS 27 beta & Xcode 27 beta. Hope this can be rectified soon.

Codex Requests Failing in Xcode 26.5 and Xcode 27 Beta
 
 
Q