Branch-activity panel above prompt grows indefinitely; no setting to hide
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.jsonkey to hide the panel (e.g.,recentActivity: falseorbranchPanel: false) - Or the panel collapsed by default with a manual expand
- Or it shows truly distinct branches not duplicates
What I tried
- Reflog expired +
git gc --prune=nowon both worktrees — no change. - Settings: added
"statusLine": falseto~/.claude/settings.jsonand restarted — no change. (Possibly because this isn't the statusLine.) - Searched the Claude Code package source — it's a precompiled native binary (
claude.exe), so no setting is grep-discoverable from outside. - 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:
- Worktree clean. 9 obsolete local branches (
feat/...,fix/...,post-prNN,claude/<worktree>) deleted viagit branch -D. Confirmedgit branchshows only the active branch. - Run
git switch -c docs/branch-creation-conventionto start new work. - Branch-list widget immediately shows 8+ old branches that were just deleted — branches no longer in
git branchoutput, no remote refs (origin pruned them), no working-tree presence. - Continue work, commit, push, merge PR.
- Run
git fetch --prune && git checkout --detach origin/main && git branch -D <merged-branch>. - 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 --all→ 0 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-pathregardless 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
- 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 -aso deleted branches drop out
- Setting to hide the panel entirely (e.g.,
recentActivity: falsein~/.claude/settings.json). - 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.)
This issue has 6 comments on GitHub. Read the full discussion on GitHub ↗