You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I encountered repeated 401 Unauthorized errors when trying to use the Codex command-line tool on Windows. I tried uninstalling and reinstalling Codex via npm, cleaning caches, and checking environment variables, but the issue persisted—sometimes the codex command wasn’t even recognized after installation. I’m wondering: could these authentication or command-path problems be related to the fact that I was experimenting with using Codex to call itself—essentially trying to build a multi-agent system by having one Codex instance control another?
Thanks for the bug report. We're actively investigating similar reports from other users. This could be an issue with token refresh. Try logging out (codex logout or /logout slash command) and logging back in, and let us know if that fixes the issue for you.
Based on the symptoms, this was likely an authentication token refresh issue. We've since added code to better handle this condition, so I'm going to close. If you see something similar with the latest versions of the CLI, please open a new bug report.
Activity
etraut-openai commentedon Oct 26, 2025
Thanks for the bug report. We're actively investigating similar reports from other users. This could be an issue with token refresh. Try logging out (
codex logoutor/logoutslash command) and logging back in, and let us know if that fixes the issue for you.TheHett commentedon Oct 27, 2025
@etraut-openai thansk, I got same trouble and logout / login hepls for me.
TheHett commentedon Oct 27, 2025
But the client should not doing retries when the 401 code is received.
etraut-openai commentedon Nov 15, 2025
Based on the symptoms, this was likely an authentication token refresh issue. We've since added code to better handle this condition, so I'm going to close. If you see something similar with the latest versions of the CLI, please open a new bug report.