claude-code - 💡(How to fix) Fix [BUG] Desktop app PR status bar shows closed/merged PRs - still broken in 2.1.109 [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#48694Fetched 2026-04-16 06:53:33
View on GitHub
Comments
1
Participants
2
Timeline
8
Reactions
0
Timeline (top)
labeled ×6commented ×1cross-referenced ×1

Root Cause

Root cause confirmed: The app queries the GitHub REST API with state=all:

Fix Action

Fix / Workaround

Attempted Workarounds (None Worked)

Code Example

GET /repos/{owner}/{repo}/pulls?head={owner}:main&state=all

---

GET /repos/{owner}/{repo}/pulls?head={owner}:main&state=open

---

# App uses state=all (returns stale PR):
$ gh api 'repos/OWNER/REPO/pulls?head=OWNER:main&state=all&per_page=1' --jq '.[0].state'
"closed"

# Fix would use state=open (returns nothing, correct):
$ gh api 'repos/OWNER/REPO/pulls?head=OWNER:main&state=open&per_page=1' --jq 'length'
0
RAW_BUFFERClick to expand / collapse

Preflight Checklist

  • I have searched existing issues and this hasn't been reported yet
  • This is a single bug report
  • I am using the latest version of Claude Code

What's Wrong?

The desktop app footer/status bar displays a merged PR from months ago when working on main. This was reported in #24834 (closed as "completed" on Feb 12, 2026) and #25512 (closed as duplicate), but the bug is not fixed as of v2.1.109.

Root cause confirmed: The app queries the GitHub REST API with state=all:

GET /repos/{owner}/{repo}/pulls?head={owner}:main&state=all

This returns the most recent PR where main was the head branch, even if that PR was merged/closed months ago. The app displays this with no filtering.

The footer shows a stale merged PR with an irrelevant branch name, wrong diff stats, and a "Merged" badge, even though the user is simply on main with no active PRs.

What Should Happen?

The query should use state=open:

GET /repos/{owner}/{repo}/pulls?head={owner}:main&state=open

If no open PR exists for the current branch, the PR indicator should not appear.

Steps to Reproduce

  1. Have a repo where main was once the HEAD of a PR (e.g., merging main into a feature branch)
  2. That PR is now merged/closed
  3. Check out main locally
  4. Open Claude Code desktop app - the footer shows the stale merged PR

Attempted Workarounds (None Worked)

  • Cleared ~/Library/Caches/com.anthropic.claudefordesktop/
  • Deleted ~/Library/Application Support/Claude/Local Storage/
  • Deleted ~/Library/Application Support/Claude/Session Storage/
  • Removed branch.main.github-pr-owner-number from .git/config
  • Disconnected and reconnected GitHub account
  • Cache is repopulated from the server on every app launch

Verification

# App uses state=all (returns stale PR):
$ gh api 'repos/OWNER/REPO/pulls?head=OWNER:main&state=all&per_page=1' --jq '.[0].state'
"closed"

# Fix would use state=open (returns nothing, correct):
$ gh api 'repos/OWNER/REPO/pulls?head=OWNER:main&state=open&per_page=1' --jq 'length'
0

Note on #24834

Issue #24834 was closed as "completed" on Feb 12, 2026, but no commit or PR was linked in the timeline, and no corresponding fix appears in any CHANGELOG entry between v2.1.38 and the current v2.1.109. The issue appears to have been closed prematurely.

Is this a regression?

Yes - #24834 was closed as "completed" but the fix never shipped.

Claude Code Version

2.1.109 (Claude Code)

Platform

Anthropic direct (Claude Code Desktop)

Operating System

macOS

Terminal/Shell

Claude Code Desktop App

extent analysis

TL;DR

The most likely fix is to update the GitHub REST API query to use state=open instead of state=all to prevent displaying stale merged PRs.

Guidance

  • Verify the issue by checking the API response with state=all and state=open using the provided gh api commands to confirm the difference in behavior.
  • Update the API query to use state=open to only retrieve open PRs, as shown in the What Should Happen? section.
  • If updating the API query is not feasible, consider implementing filtering on the client-side to exclude merged or closed PRs from being displayed.
  • Review the code changes and commit history to ensure the fix is properly implemented and tested.

Example

No code snippet is provided as the issue is focused on the API query and its parameters.

Notes

The issue appears to be a regression, and the previous fix was not properly implemented or shipped. The provided gh api commands can be used to verify the issue and test the fix.

Recommendation

Apply the workaround by updating the API query to use state=open, as this is a more accurate and reliable solution to prevent displaying stale merged PRs.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

claude-code - 💡(How to fix) Fix [BUG] Desktop app PR status bar shows closed/merged PRs - still broken in 2.1.109 [1 comments, 2 participants]