Manual Approval Mode (Full Access) is required to authenticate using `GH_TOKEN`

Resolved 💬 4 comments Opened Sep 18, 2025 by kylesnowschwartz Closed Jan 13, 2026

What version of Codex is running?

codex-cli 0.38.0

Which model were you using?

gpt-5-codex

What platform is your computer?

Darwin 24.6.0 arm64 arm

What steps can reproduce the bug?

Configure codex like so:

# config.toml

model = "gpt-5-codex"
approval_policy = "on-request"
sandbox_mode = "workspace-write"

[sandbox_workspace_write]
network_access = true

[tui]
notifications = true

[shell_environment_policy]
inherit = "all"
ignore_default_excludes = true   # I don't necessarily want to set this, but I did for debugging

Run codex and ask it run gh auth status

What is the expected behavior?

I expect to be able to ask Codex to run github cli commands (like viewing pull request diffs for context) using gh without Full Access which I assume is essentially the dangerous "--yolo" mode. And if Full Access _is_ required I would like to configure it in config.toml not have to manually configure it every codex session.

What do you see instead?

Github fails to login suggesting the token is invalid.

Additional information

Using gh works in the terminal, works in Claude Code, and I tried manually refreshing my authentication and token permissions using gh auth refresh ... and gh auth login ... but that did not help.

The workaround that does work:

  • run /approvals in codex
  • Change the approval mode to Full Access

Then, Github authentication works as expected:

<img width="964" height="330" alt="Image" src="https://github.com/user-attachments/assets/fab5ef43-d06a-4102-b2ae-285e852d2cc3" />

View original on GitHub ↗

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