[BUG] Desktop app PR status bar shows closed/merged PRs

Status Fixed / completed
Reported on v2.1.109
Maintainer reply ✓ Yes — amorriscode
Activity 13 comments · opened Apr 15, 2026 · closed May 12, 2026
💡 Likely answer: A maintainer (amorriscode, contributor) responded on this thread — see the highlighted reply below.

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report
  • [x] 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.

<img width="836" height="52" alt="Image" src="https://github.com/user-attachments/assets/f2bd2002-9eae-4bdc-a6da-6f8625fa5b73" />

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

View original on GitHub ↗

13 Comments

dpjrodrigues · 4 months ago

same issue for me... it worked only by deleting the respective folder under .claude/projects/<project> but not a workarround since we lose all history

Astro-Han · 4 months ago

I'm seeing a related variant: 15 worktree sessions on the Desktop home screen, each listed as a separate "In review" entry, all pointing to the same open PR #3 in my repo.

gh pr list --state open confirms only 1 PR exists. The home screen appears to create one entry per worktree branch that matches a PR, without deduplicating by PR number. No way to dismiss them.

This is the same underlying PR association logic — in my case the PR is actually open, but the match fans out across every worktree branch in the session history.

Claude Code Desktop, macOS, v2.1.109.

amorriscode contributor · 4 months ago

The next desktop release should resolve this. This was related to working in folders without worktrees; old PRs were still associated to the folder.

ChrispyKreme86 · 4 months ago

@amorriscode Thanks, Anthony! You the man!

ChrispyKreme86 · 4 months ago

Still broken as of v2.1.123.

Desktop version: Claude 1.5354.0 (9a9e3d) 2026-04-29T01:14:34.000Z

ChrispyKreme86 · 3 months ago

Still broken as of Claude 1.6259.1 (5095e7) 2026-05-06T03:26:09.000Z

ChrispyKreme86 · 3 months ago

Still broken as of Claude 1.6608.0 (f65729) 2026-05-07T14:16:09.000Z

ChrispyKreme86 · 3 months ago

@amorriscode any update on this?

arjunven · 3 months ago

<img width="1331" height="241" alt="Image" src="https://github.com/user-attachments/assets/59231552-7f5e-4d67-9d17-392f5d6e3c8b" />

also still broken for me on Claude 1.6608.0 (f65729) 2026-05-07T14:16:09.000Z

For reference... it's picking up this 14 month old PR :(

andrewneilson · 3 months ago

This is definitely not fixed as of Claude 1.9659.1 (193bcb) 2026-05-28T16:22:15.000Z

ChrispyKreme86 · 3 months ago

Regressed to the broken state as of Claude 1.9659.2 (390d6c) 2026-05-28T21:50:01.000Z

ChrispyKreme86 · 3 months ago

Still reproducing on Claude Code 2.1.156 (originally filed against 2.1.109).

Fresh repro today in the desktop app (local agent mode): on main in a repo with 0 open PRs, the footer shows a stale closed PR with the red closed-PR glyph.

Which PR it shows has changed since the original screenshot, and that's itself diagnostic: the original showed a merged PR, it now shows a closed, unmerged one. That pins down the root cause: the footer renders the most recently created PR where head=OWNER:main, regardless of whether that PR is open, closed, or merged.

API verification (owner/repo redacted):

# What the app queries (state=all): returns the stale closed PR it displays
$ gh api 'repos/OWNER/REPO/pulls?head=OWNER:main&state=all&per_page=1' \
    --jq '.[0] | {state, merged_at}'
{"state":"closed","merged_at":null}

# The fix (state=open): correctly returns nothing
$ gh api 'repos/OWNER/REPO/pulls?head=OWNER:main&state=open&per_page=1' \
    --jq 'length'
0

The originally proposed fix still stands: query state=open (or filter to open PRs client-side) and render no indicator when none is open.

I don't have permission to reopen this myself. Could a maintainer reopen it for re-triage? It looks like the same premature-closure pattern noted for #24834.

github-actions[bot] · 1 month ago

This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.