[BUG] Stale "Pull request status couldn't be checked" on archived sessions whose repo/worktree was deleted
What's Wrong?
A local code session shows a persistent warning: "Pull request status couldn't be checked and may be out of date." The session is archived, its git worktree and local repository checkout have been deleted, and its associated PR was already merged. Because the local repo/worktree no longer exist, the app cannot re-run the PR status check, so it displays an un-dismissable stale warning indefinitely.
What Should Happen?
For archived sessions (or any session whose working directory / repository no longer exists), the app should either suppress the PR-status check, show a clear terminal state (e.g. "merged" or "repository no longer available"), or allow dismissing the warning — rather than a permanent "couldn't be checked" notice.
Error Messages/Logs
Pull request status couldn't be checked and may be out of date
Steps to Reproduce
- Create a local code session that opens a PR from a git worktree.
- Merge the PR, then delete the worktree and the local repository checkout.
- Archive the session.
- The session keeps showing "Pull request status couldn't be checked and may be out of date," with no way to clear it short of deleting the session's metadata file.
Regression?
I don't know
Claude Code Version
~2.1.156 (Claude Desktop, integrated Claude Code)
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
Other (Claude Desktop integrated environment)
Additional Information
Related to the closed issue anthropics/claude-code#24834 ("Footer shows closed/merged PR indicator — should only display open PRs"). This case differs in that the repo/worktree is gone entirely, so the status is un-checkable rather than merely wrong. Workaround: delete the session's local metadata file.