Codex App Pull Requests defaults to github.com and ignores authenticated GitHub Enterprise host
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 48/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Quiet
- Tech stack
- git, github, rust
- Domain
- authentication, desktop
Research direction
Start at the Pull Requests route and its empty-state host-selection logic, then trace the backend hostname handling and the pull-request-last-account persistence key. Done means an Enterprise-only authenticated host is discovered, inferred, or selectable instead of defaulting to github.com, with both authentication and current-user probes using that host.
Written by the indexing model from the issue text.
Description
What version of the Codex App are you using?
Codex App 26.715.31251 (build 5538).
What platform are you using?
macOS, Apple Silicon.
Summary
The top-level Pull Requests inbox defaults its authentication probe to github.com, even when GitHub CLI is authenticated only for a self-hosted GitHub Enterprise host. The UI consequently displays GitHub CLI setup required with gh: Requires authentication (HTTP 401), although Enterprise authentication and PR access work correctly.
The inbox supports Enterprise hostnames once an Enterprise PR/account has already been remembered, but the initial inbox provides no hostname/account selector and does not infer the host from configured gh accounts or Git remotes. This creates a bootstrap failure for Enterprise-only users.
Steps to reproduce
-
Configure and authenticate GitHub CLI for a self-hosted Enterprise host:
gh auth login --hostname <enterprise-host> --web --git-protocol https -
Do not have a valid
github.comlogin. -
Verify Enterprise access works:
gh auth status --hostname <enterprise-host> gh api user --hostname <enterprise-host> --jq .login gh pr list --repo <enterprise-host>/<owner>/<repo> --limit 1 -
Restart Codex App.
-
Open the top-level Pull Requests navigation.
-
Click Check again.
Actual behavior
The Pull Requests page reports:
GitHub CLI setup required
gh: Requires authentication (HTTP 401)
Authenticating the Enterprise host again does not help. Removing a stale github.com account changes the aggregate CLI authentication state but does not make the inbox select the Enterprise host.
Expected behavior
When no account has been remembered, the Pull Requests inbox should do one of the following:
- discover authenticated hosts from
gh auth statusand select the sole authenticated host; - infer the hostname from the active repository remote; or
- present a hostname/account selector before probing the current user.
It should not silently default to github.com when only a GitHub Enterprise account is authenticated.
Verified diagnostics
The Enterprise credentials and API/PR access were verified outside the network-restricted tool sandbox:
✓ Logged in to <enterprise-host> account <redacted> (keyring)
- Active account: true
- Git operations protocol: https
- Token scopes: gist, read:org, repo, workflow
Both gh api user --hostname <enterprise-host> and gh pr list succeeded.
Packaged implementation evidence
Inspection of the installed app.asar shows the Pull Requests route defaults githubHostname to github.com when there is no selected PR or remembered account. The current-user query then executes the equivalent of:
gh api user --hostname github.com
The backend supports an explicit hostname and uses it for both probes:
gh auth status --active --hostname <hostname>
gh api user --hostname <hostname>
The persisted account key is pull-request-last-account, but there is no visible way to initialize it to an Enterprise host from the empty/error inbox.
This is related to openai/codex#33071, but narrower: GitHub Enterprise is already represented in the PR route and backend; the failure is the initial host-selection/bootstrap behavior.
- Dominant language
- Rust
- Stars
- 125k
- Forks
- 19.5k
- Avg merge
- 1m
- Merged PRs (30d)
- 1k
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from openai/codex
-
enhancement remote
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
bug CLI windows-os
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
macOS sandbox blocks hw.optional.arm64 sysctl, causing Flutter to misdetect Apple Silicon as x64 Openbug CLI sandbox
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
bug CLI TUI
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
-
CLI config enhancement skills
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
kwakseongjae/auto-hwp#319 ·
-
area:cli bug filter-quality good first issue priority:medium
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
Difficulty 1/5 Under an hour Newbie friendliness 72/100
bevyengine/bevy#25861 ·
-
comp-datalake
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
ClickHouse/ClickHouse#121222 ·
-
A-linter
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
oxc-project/oxc#26863 ·