[BUG] UI displays stale state after session changes (branch label + plan content)

Status Closed — not planned
Maintainer reply None cached
Activity 6 comments · opened Apr 9, 2026 · closed May 27, 2026

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?

Two instances of the UI displaying stale state within the same session. UI appears to snapshot state at session start / ExitPlanMode call time and never updates. UI shows stale snapshots. The "Create PR" button pointing at a deleted branch is a potential footgun.

What Should Happen?

UI reflects current live state — current branch and current plan file contents. UI should update reactively. Workaround is starting a new session, which is disruptive.

Error Messages/Logs

None

Steps to Reproduce

  1. Start a session scoped to a feature branch
  2. Instead of using the branch, commit all work directly to main and push
  3. Delete the feature branch from GitHub (it was never merged — just abandoned)
  4. Run git fetch --prune origin in the session
  5. Observe: session UI still shows the deleted branch name and a live "Create PR" button pointing at it — no way to clear mid-session
  6. In the same session, enter plan mode, complete a task, call ExitPlanMode and have it approved
  7. Start a new planning task, fully overwrite the plan file with new content, call ExitPlanMode again
  8. Observe: plan panel still shows content from the first ExitPlanMode call — no way to refresh mid-session

Claude Model

Sonnet (default)

Is this a regression?

I don't know

Last Working Version

IDK

Claude Code Version

  • Claude Code App (Android) - Claude Code Web (claude.ai/code) - GitHub-connected repository

Platform

Anthropic API

Operating System

Windows and Android

Terminal/Shell

Other

Additional Information

Two specific UX risks identified:

  1. "Create PR" button remains active pointing at a deleted branch. A user could accidentally trigger a PR creation against a branch that no longer exists, potentially causing a confusing error or unexpected behavior.
  1. Stale plan panel actively interferes with new planning tasks. When a new planning task is started in the same session, the plan panel still shows the previously approved plan. When ExitPlanMode is called for the new task, the user is asked to approve a plan — but the panel displays the old plan content, not the new one. The user has no way of knowing whether they are approving the current plan or the stale one. In our case, we approved a new workflow change while the panel was still showing an unrelated README update plan from earlier in the session. This is a meaningful trust and accuracy issue — the approval UI cannot be relied upon to show what is actually being approved.
  1. Cross-platform reproducibility. The original plan was created and approved in the Android app. The session was later continued in the web app (claude.ai/code), where the second plan was generated. The stale plan panel showed the Android-session plan content while the web app was asking for approval of the new plan. This suggests the stale state issue persists across platform switches within the same session, not just within a single platform.

View original on GitHub ↗

6 Comments

github-actions[bot] · 6 months ago

Found 3 possible duplicate issues:

  1. https://github.com/anthropics/claude-code/issues/36364
  2. https://github.com/anthropics/claude-code/issues/41762
  3. https://github.com/anthropics/claude-code/issues/44203

This issue will be automatically closed as a duplicate in 3 days.

  • If your issue is a duplicate, please close it and 👍 the existing issue instead
  • To prevent auto-closure, add a comment or 👎 this comment

🤖 Generated with Claude Code

BoB-t-Omega · 6 months ago

After reviewing the issues flagged as potential duplicates, these all appear to share the same root cause — UI state is snapshotted at a point in time and not re-evaluated reactively — but each affects a different surface:

  • #36364 — branch diff tracker showing stale line counts after merge
  • #41762 — session name badge persisting in the CLI status bar across restarts
  • #44203 — "Commit to main" button stuck in disabled state after subsequent commits

None of these cover the plan approval UI showing stale content. When ExitPlanMode is called for a new task, the approval panel displayed the previously approved plan rather than the current one — we were approving a workflow change while the panel showed an unrelated README update from earlier in the session. Easy to miss and a potential trust issue around what's actually being approved.

Also worth noting: this was reproduced across a session that started on Android and continued in the web app, suggesting the stale state persists across platform switches within the same session.

tmills86 · 5 months ago

Still reproduces on Claude Code CLI with Opus 4.7 (1M context), macOS, 2026-04-19.

Specific trigger in my session:

  1. Session started in plan mode with plan file A (auto-created by first system reminder)
  2. Approved plan A via ExitPlanMode, executed the work
  3. Later, user asked for an unrelated task and I called EnterPlanMode
  4. Wrote a fully new plan to a different path (/Users/tim/.claude/plans/fix-fin-guidance-sync.md)
  5. Called ExitPlanMode — approval UI showed plan A's content, not the new file

Impact: user almost approved the wrong plan. Only caught because they noticed the mismatch and said "you just showed me the previous plan, not that one". Easy to miss on a quick skim, and the two plans were in completely unrelated domains (article content edits vs. building a new discovery script).

Workaround currently: start a fresh session for each new plan, which defeats much of the point of re-entering plan mode mid-conversation.

github-actions[bot] · 4 months ago

Closing for now — inactive for too long. Please open a new issue if this is still relevant.

BoB-t-Omega · 4 months ago

Huh 🤷

github-actions[bot] · 2 months 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.