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
Thanks again for the report. I tried to reproduce this on the exact shipped v0.56.8 build on Windows, but I could not reproduce the Authentication required failure here.
On my test machine:
Codex CLI is installed and logged in via ChatGPT.
~/.codex/auth.json exists.
Win-CodexBar successfully shows the Codex plan and weekly usage in the tray.
I can see a possibly related inconsistency: Settings > Providers > Codex discovers the Ambient account but its account card can say No usage data while the main Codex provider still shows usage.
Could you please send the following so I can match your setup and make this easy to reproduce/fix?
Win-CodexBar version and Windows version.
In PowerShell, paste the output of these commands:
where.exe codex
codex --version
codex login status
$env:CODEX_HOME
If CODEX_HOME is blank, just say it is not set.
Run Win-CodexBar's safe diagnostic and paste the JSON output:
codexbar-cli diagnose -p codex --source auto --pretty
If Auto reports authentication required, please also run:
I reproduced this on Windows. Codex was installed and reported Logged in using ChatGPT, and the ChatGPT usage endpoint returned HTTP 200. The cause was a stale Codex OAuth session: auth.json last_refresh was about 215 hours old, beyond Win-CodexBar's intentional 8-day external-OAuth safety gate, so the app returned Authentication required even though the account was valid. Fix: run codex login --device-auth, complete the device login, restart Win-CodexBar, and click Refresh. After completing that flow, last_refresh was under 1 minute old and usage worked again. No token or auth.json contents are needed.
I opened PR #475 to make this workaround a button: #475
In Settings > Providers > Codex Accounts, the new Refresh login action re-runs the official Codex login flow for the Ambient account, keeps managed account homes untouched, then refreshes usage. This is intended to replace manually running codex login --device-auth when the external OAuth staleness gate reports Authentication required.
The focused account-panel tests and frontend build pass; Rust/native validation is left to CI because my local checkout has no Cargo toolchain.
Closing this issue based on merged PR #484, which addresses the reported user-facing failure: when the ambient Codex profile is available but stale authentication blocks usage, the app provides Refresh login, reconciles the authenticated account, invalidates stale usage, and refreshes Codex usage without requiring an app restart.
The intentional 8-day stale external OAuth gate remains in place. PR #502 is a separate security-hardening change for redacting Codex login diagnostics and is not the functional fix for this issue.
Activity
Finesssee commentedon Sep 8, 2026
Hey thanks for the report. I will try to fix it ASAP.
Finesssee commentedon Sep 9, 2026
Thanks again for the report. I tried to reproduce this on the exact shipped v0.56.8 build on Windows, but I could not reproduce the Authentication required failure here.
On my test machine:
Could you please send the following so I can match your setup and make this easy to reproduce/fix?
Win-CodexBar version and Windows version.
In PowerShell, paste the output of these commands:
If CODEX_HOME is blank, just say it is not set.
Run Win-CodexBar's safe diagnostic and paste the JSON output:
If Auto reports authentication required, please also run:
This diagnostic is intentionally redacted and does not print cookies, tokens, account emails, or raw provider responses.
Please tell me whether you use Codex CLI, Codex Desktop, or both.
After clicking Refresh once, please attach screenshots of:
Please do not paste auth.json or any token/cookie contents.
With those details I should be able to reproduce the exact account-discovery/fetch path instead of guessing from the current screenshot.
stephanus-tantiono commentedon Sep 10, 2026
I reproduced this on Windows. Codex was installed and reported Logged in using ChatGPT, and the ChatGPT usage endpoint returned HTTP 200. The cause was a stale Codex OAuth session: auth.json last_refresh was about 215 hours old, beyond Win-CodexBar's intentional 8-day external-OAuth safety gate, so the app returned Authentication required even though the account was valid. Fix: run codex login --device-auth, complete the device login, restart Win-CodexBar, and click Refresh. After completing that flow, last_refresh was under 1 minute old and usage worked again. No token or auth.json contents are needed.
stephanus-tantiono commentedon Sep 10, 2026
I opened PR #475 to make this workaround a button: #475
In Settings > Providers > Codex Accounts, the new Refresh login action re-runs the official Codex login flow for the Ambient account, keeps managed account homes untouched, then refreshes usage. This is intended to replace manually running codex login --device-auth when the external OAuth staleness gate reports Authentication required.
The focused account-panel tests and frontend build pass; Rust/native validation is left to CI because my local checkout has no Cargo toolchain.
zvirja commentedon Sep 10, 2026
@stephanus-tantiono Thanks! I'll try it later 😊
UPD: Device sign in is not allowed in my org, but I managed to login to codex and just add account to the app. So it works!
Finesssee commentedon Sep 11, 2026
Hey, thanks for the report. I will check on this ASAP.
Finesssee commentedon Sep 14, 2026
Closing this issue based on merged PR #484, which addresses the reported user-facing failure: when the ambient Codex profile is available but stale authentication blocks usage, the app provides Refresh login, reconciles the authenticated account, invalidates stale usage, and refreshes Codex usage without requiring an app restart.
The intentional 8-day stale external OAuth gate remains in place. PR #502 is a separate security-hardening change for redacting Codex login diagnostics and is not the functional fix for this issue.