PR status line does not show open PR even though gh pr view succeeds
Open 💬 2 comments Opened May 19, 2026 by nanggo
Environment
- Codex CLI:
codex-cli 0.131.0 - Platform: macOS
- Repository: private GitHub repository
- GitHub CLI is authenticated with an account that has access to the private repository.
Config
~/.codex/config.toml:
[tui]
status_line = [
"model-with-reasoning",
"git-branch",
"context-remaining",
"five-hour-limit",
"weekly-limit",
"pull-request-number",
"task-progress"
]
status_line_use_colors = true
Reproduction
- Open Codex CLI in a local branch that has an open GitHub PR.
- Confirm the PR is discoverable from the same cwd:
gh pr view --json number,url,state,headRefName,headRefOid
Example successful output:
{
"number": 123,
"state": "OPEN",
"url": "https://github.com/<org>/<repo>/pull/123",
"headRefName": "feature/example-branch",
"headRefOid": "<head-sha>"
}
- Confirm it also works with the same prompt-disabled env used by Codex status probes:
env GH_PROMPT_DISABLED=1 GIT_TERMINAL_PROMPT=0 gh pr view --json number,url,state
env GH_PROMPT_DISABLED=1 GIT_TERMINAL_PROMPT=0 /opt/homebrew/bin/gh pr view --json number,url,state
Both return the open PR.
Expected Behavior
The TUI status line should render PR #123 when pull-request-number is enabled.
The Codex App PR panel should also detect the open PR, or report the failed lookup reason.
Actual Behavior
- Codex CLI status line does not show the PR number.
- Codex App shows
Pull request status unavailable. - Manual
gh pr viewsucceeds from the same repo/cwd.
Notes
From the public source, pull-request-number appears to use gh pr view --json number,url,state via the status-line git summary path:
codex-rs/tui/src/branch_summary.rscodex-rs/tui/src/chatwidget/status_surfaces.rs
Since the same command succeeds manually, this looks like the status-line/App PR lookup is not refreshing, not receiving the git summary result, or is using a different execution context than the user shell.
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗