Codex cannot access gh

Open 💬 4 comments Opened Jul 3, 2026 by Martin-Carlsson

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

newest

What subscription do you have?

pro

What platform is your computer?

mac

What issue are you seeing?

Codex keeps insisting that I am not logged in to gh (github cli), even though I am logged in.

This is what Codex chat sees:

github.com
  X Failed to log in to github.com account Martin-Carlsson (default)
  - Active account: true
  - The token in default is invalid.
  - To re-authenticate, run: gh auth login -h github.com
  - To forget about this account, run: gh auth logout -h github.com -u Martin-Carlsson

What the normal terminal sees:

➜  ~ gh auth status
github.com
  ✓ Logged in to github.com account Martin-Carlsson (keyring)
  - Active account: true
  - Git operations protocol: https
  - Token: gho_************************************
  - Token scopes: 'gist', 'read:org', 'repo', 'workflow'
➜  ~

What steps can reproduce the bug?

Any prompt to do a GitHub command, like: Create a PR

What is the expected behavior?

_No response_

Additional information

_No response_

View original on GitHub ↗

This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗