[BUG] Footer shows closed/merged PR indicator — should only display open PRs
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
The readline footer displays a PR #<number> indicator for closed PRs. When working on a branch that previously had a PR (now closed), the footer still shows the PR reference with no way to dismiss it. The indicator persists across session restarts.
Root cause: Claude Code appears to use gh pr view (no state filter) to detect PRs for the current branch. gh pr view returns the most recent PR regardless of state (OPEN, CLOSED, MERGED):
$ gh pr view --json number,state
{"number":53,"state":"CLOSED"}
What Should Happen?
The PR indicator in the footer should only appear when the PR state is OPEN. Closed and merged PRs should not be displayed.
Error Messages/Logs
No error — the indicator simply shows stale data. The footer reads:
bypass permissions on (shift+tab to cycle) · PR #53
despite PR #53 being closed.
Steps to Reproduce
- Create a branch (e.g.,
gitbutler/workspace) - Open a PR from that branch (e.g., PR #53)
- Close or merge the PR on GitHub
- Stay on the same branch
- Launch
claude— the footer still showsPR #53 - Restart the session — still shows
PR #53
Verification that the PR is closed:
$ gh pr list --state all --head gitbutler/workspace --json number,state
[{"number":53,"state":"CLOSED"}]
$ gh pr list --head gitbutler/workspace --json number,state
[]
gh pr list (open only) returns empty, but gh pr view still returns the closed PR.
Is this a regression?
Not sure / I don't know
Claude Code Version
2.1.38 (Claude Code)
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
Warp
Additional Information
There is no local config or setting to suppress the PR indicator. The only workaround would be to delete the PR entirely from GitHub, which is not feasible.
A suggested fix: filter gh pr view results by state, or use gh pr list --head <branch> --json number which only returns open PRs by default.
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗