codex - 💡(How to fix) Fix SSH remote sessions keep using stale auth after switching accounts until the connection is restarted [1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openai/codex#22419Fetched 2026-05-14 03:36:21
View on GitHub
Comments
0
Participants
1
Timeline
7
Reactions
0
Participants
Timeline (top)
labeled ×5unlabeled ×2

Error Message

The current error suggests the user needs to sign in again, but the actual fix is restarting the existing remote connection.

Root Cause

Your access token could not be refreshed because you have since logged out or signed in to another account. Please sign in again.

Fix Action

Workaround

Open Codex App settings, go to Connections, open the remote connection menu, and click Restart.

RAW_BUFFERClick to expand / collapse

What version of the Codex App are you using (From “About Codex” dialog)?

0.130.0-alpha.5

What subscription do you have?

ChatGPT Plus

What platform is your computer?

Microsoft Windows NT 10.0.22631.0 x64; WSL Ubuntu via Codex App SSH remote connection

What issue are you seeing?

After switching accounts in Codex App / Codex CLI, local Codex sessions work, but SSH remote sessions into WSL keep failing with:

Your access token could not be refreshed because you have since logged out or signed in to another account. Please sign in again.

The fix is not signing in again. The SSH remote connection has to be restarted manually from Settings -> Connections -> [connection menu] -> Restart. After that, the remote session works again.

It looks like the SSH remote connection keeps stale auth state after the local account changes. Codex should either refresh/restart the remote connection automatically, or show an actionable message telling the user to restart the connection.

What steps can reproduce the bug?

What happened?

On Windows + WSL using Codex App SSH remote connections, switching accounts in Codex App / Codex CLI can leave an existing SSH remote connection using stale authentication state.

After switching accounts, local Codex App sessions work correctly. However, starting a Codex session through the SSH remote connection fails with:

Your access token could not be refreshed because you have since logged out or signed in to another account. Please sign in again.

The confusing part is that signing in again, reinstalling the app, or refreshing the local CLI auth does not make the remote session work. The remote connection has to be restarted manually from:

Settings -> Connections -> [remote connection menu] -> Restart

After restarting the connection there, SSH remote sessions work again.

Steps to reproduce

  1. Use Codex App on Windows with a WSL/SSH remote connection configured.

  2. Sign in to Codex App / Codex CLI.

  3. Switch to another account or otherwise refresh the local Codex auth.

  4. Start a new local Codex App session. It works.

  5. Start a new session through the existing SSH remote connection.

  6. The remote session fails with:

    Your access token could not be refreshed because you have since logged out or signed in to another account. Please sign in again.

  7. Go to Settings -> Connections, open the menu for the SSH remote connection, and click Restart.

  8. Start the SSH remote session again. It works.

Expected behavior

When the Codex account changes, SSH remote connections should either:

  • automatically refresh/restart their auth state, or
  • show an actionable message telling the user to restart the remote connection from Settings -> Connections.

The current error suggests the user needs to sign in again, but the actual fix is restarting the existing remote connection.

Actual behavior

The SSH remote connection appears to keep using stale auth until it is manually restarted.

Workaround

Open Codex App settings, go to Connections, open the remote connection menu, and click Restart.

Environment

  • OS: Windows
  • Remote target: WSL via SSH remote connection
  • Components involved: Codex App, Codex CLI, SSH remote connections, auth/account switching

What is the expected behavior?

No response

Additional information

No response

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

FAQ

Expected behavior

When the Codex account changes, SSH remote connections should either:

  • automatically refresh/restart their auth state, or
  • show an actionable message telling the user to restart the remote connection from Settings -> Connections.

The current error suggests the user needs to sign in again, but the actual fix is restarting the existing remote connection.

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

codex - 💡(How to fix) Fix SSH remote sessions keep using stale auth after switching accounts until the connection is restarted [1 participants]