I have the same issue and also ran a bunch of troubleshooting in terminal. I deleted/reinstalled everything related to xcode or codex in the terminal (including cache). I also removed any keychains related to xcode/codex.
After reinstalling everything, sign in would still fail. Well to be clear, the log in window via "Sign In With a ChatGPT Account" would always allow me to sign in and be successful, however when I close the window, the settings in xcode still says chatgpt is "not signed in"
Topic:
Developer Tools & Services
SubTopic:
Xcode