claude-code - 💡(How to fix) Fix Branch-activity panel above prompt grows indefinitely; no setting to hide

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…

Root Cause

  1. Reflog expired + git gc --prune=now on both worktrees — no change.
  2. Settings: added "statusLine": false to ~/.claude/settings.json and restarted — no change. (Possibly because this isn't the statusLine.)
  3. Searched the Claude Code package source — it's a precompiled native binary (claude.exe), so no setting is grep-discoverable from outside.
  4. The "Show less" button collapses for the session, but it returns next launch.

Fix Action

Workaround

Click "Show less" on every session start. Or move to a different IDE that doesn't render this widget.


(Drafted by Claude during a debugging session — feel free to edit / repackage.)

Code Example

main ← e2e/booking-happy-path    Merged
main ← e2e/booking-happy-path    Merged
main ← e2e/booking-happy-path    Merged
... (15 entries currently, growing with every merge)
Show less
[Type / for commands]
RAW_BUFFERClick to expand / collapse

Branch-activity panel above prompt grows indefinitely; no setting to hide

Claude Code version: Opus 4.7 · Extra high (Windows, npm-installed @anthropic-ai/claude-code)

What's happening

Above the prompt input box, an undocumented panel lists recent merged PRs as rows like:

main ← e2e/booking-happy-path    Merged
main ← e2e/booking-happy-path    Merged
main ← e2e/booking-happy-path    Merged
... (15 entries currently, growing with every merge)
Show less
[Type / for commands]

Initially showed 6 duplicate entries for one branch (e2e/booking-happy-path, deleted weeks ago). After 9 more PRs merged in the same repo, panel now shows 15 entries — appears to be accumulating one row per merge, not per unique branch.

What I expect

Either:

  • A documented settings.json key to hide the panel (e.g., recentActivity: false or branchPanel: false)
  • Or the panel collapsed by default with a manual expand
  • Or it shows truly distinct branches not duplicates

What I tried

  1. Reflog expired + git gc --prune=now on both worktrees — no change.
  2. Settings: added "statusLine": false to ~/.claude/settings.json and restarted — no change. (Possibly because this isn't the statusLine.)
  3. Searched the Claude Code package source — it's a precompiled native binary (claude.exe), so no setting is grep-discoverable from outside.
  4. The "Show less" button collapses for the session, but it returns next launch.

Repo context

Solo founder, 50 PRs merged in gmanch94/plotspot over a week. Each merge appears to add a row. Branches are deleted on remote after merge (default GitHub setting). Local stale branches were pruned (git fetch -p + git branch -D for [gone]-tracked).

Second symptom (2026-05-08): branch list flickers stale entries on branch creation

Distinct from the panel-grows-with-merges issue, but possibly the same widget reading stale state.

Repro:

  1. Worktree clean. 9 obsolete local branches (feat/..., fix/..., post-prNN, claude/<worktree>) deleted via git branch -D. Confirmed git branch shows only the active branch.
  2. Run git switch -c docs/branch-creation-convention to start new work.
  3. Branch-list widget immediately shows 8+ old branches that were just deleted — branches no longer in git branch output, no remote refs (origin pruned them), no working-tree presence.
  4. Continue work, commit, push, merge PR.
  5. Run git fetch --prune && git checkout --detach origin/main && git branch -D <merged-branch>.
  6. Stale entries disappear from the widget.

Suggests the widget caches a branch snapshot independently of git branch and only invalidates on certain git operations (fetch? checkout?), not on git switch -c.

Both symptoms point at: the widget has state distinct from git, and that state is not invalidated by all branch-mutating commands. A --refresh-on=any-git-mutation posture would fix both.

Investigation log (2026-05-08)

Hypothesis 1: data source is session transcripts. Disproved.

e2e/booking-happy-path appears in 5 .jsonl transcripts under ~/.claude/projects/<projectdir>/. Moved 4 of them (kept the active session) to a parking dir, fully restarted Claude Code, observed the widget.

Result: row count unchanged. Sticky branch still displayed at the same multiplicity. Transcripts are NOT the source.

(Files restored after the test.)

Hypothesis 2: render bug, not a data-source bug

What the actual data shows:

  • gh pr list --state all --search "head:e2e/booking-happy-path"1 PR (#16, merged weeks ago)
  • git log --all --grep="e2e/booking-happy-path"1 merge commit (0f88df5 Merge pull request #16 from gmanch94/e2e/booking-happy-path)
  • git reflog --all0 hits after gc
  • ~/.claude/{sessions,cache,file-history,history.jsonl,backups,paste-cache,plans,tasks,telemetry,session-env}0 hits
  • gh CLI cache (~/.config/gh/) → no per-repo activity log

The branch genuinely has only 1 merge. But the widget shows it 6 times (initially) and the panel grows with every subsequent merge to a different branch. So the rendering layer is decoupled from the underlying data:

  • Widget tracks the right count of merge events (one per merged PR)
  • Widget tracks the wrong label — every row renders with e2e/booking-happy-path regardless of the actual branch on the underlying merge

Likely a stale-cache-in-render-layer bug (the first merge's label sticks for all subsequent rows) or a copy-paste bug where the row template uses a captured variable instead of the per-row datum.

Confirms: widget data is independent of session transcripts AND of git/reflog. Most likely source = gh pr list --state merged (or its API equivalent), with a label-binding bug in the render path.

Asks

  1. Confirm the data source. If it really is ~/.claude/projects/<projectdir>/*.jsonl, document it and provide either:
    • A retention policy (e.g., only scan transcripts from the last N days)
    • A dedup-by-branch mode
    • Intersect with git branch -a so deleted branches drop out
  2. Setting to hide the panel entirely (e.g., recentActivity: false in ~/.claude/settings.json).
  3. Manual reset path: documented command/keybind to clear the panel state without nuking transcripts.

Workaround

Click "Show less" on every session start. Or move to a different IDE that doesn't render this widget.


(Drafted by Claude during a debugging session — feel free to edit / repackage.)

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