UI shows stale PR/merge state — PR displayed as "not merged" with green CI after it was already squash-merged
Summary
After a PR's CI passed and the PR was squash-merged on GitHub (branch + worktree auto-deleted), the Claude Code UI kept showing the PR as green-CI-but-not-merged. The displayed state never reconciled with GitHub's actual MERGED state — only gh pr view revealed the truth. This appears to be recurring.
Environment
- Claude Code: 2.1.145
- macOS: 26.5 (25F71)
- node: v24.11.1
- gh: 2.93.0
- Repo config: GitHub squash-merge + auto-delete-branch; work done in a git worktree under
.claude/worktrees/
Steps to reproduce (observed)
- Create a branch + PR from a worktree under
.claude/worktrees/<name>. - CI ("Check" workflow) goes green.
- PR is squash-merged on GitHub, which auto-deletes the remote branch (and the local worktree gets cleaned up).
- Observe the Claude Code UI's PR/CI status.
Expected
UI reflects PR = merged, and the deleted branch/worktree state is updated.
Actual
UI shows CI green but the PR as "not merged" (stale). The status never reconciles. Confirming true state required dropping to the GitHub API:
gh pr view 11620 --json state,mergedAt,mergeCommit
# state=MERGED mergedAt=... mergeCommit=aa2635b54d...
Impact
- In-app PR/CI/merge status can't be trusted; user must use
ghto learn the real state. - Compounded by squash-merge silently removing the session's worktree, leaving the UI pointing at a directory that no longer exists.
Notes
GitHub was the correct source of truth throughout (origin/main carried the squash commit). The discrepancy is purely the harness UI not polling/invalidating PR + worktree state after an external (queue/squash) merge.
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗