Skip to content

Context ring: "Show details" parts unavailable while a turn runs; ring reported missing right after sending #8233

Description

@AlexVialaBellander

Summary

While a Claude Code turn runs, the composer's context ring card loses its "Show details" breakdown: it shows only "Estimated context / N% used / tokens / % left", and the parts (messages, memory files, skills, tools…) reappear only after the reply ends. Those parts matter most while the context is filling up. The user also reports that the ring itself disappears for a while right after a message is sent (observed by the user; not reproduced by the agent, see below).

Versions and environment

  • bb 0.50.1, desktop app, macOS 27.0.1
  • Claude Code 2.1.332, Opus 5.5 with a 1M window, worktree environment

Steps to reproduce

  1. Start a Claude Code thread and let one reply finish. Hover the context ring beside the permission menu: the card has "Show details", which expands the parts.
  2. Send a message that makes the agent work for a while (several tool calls).
  3. While the turn runs, hover the ring again.

Expected vs actual

Actual (step 3, read from the card mid-turn): Estimated context · 22% used · 216k / 1m tokens · 78% left. There is no "Show details" button until the turn ends.

Expected: "Show details" stays available mid-turn, with the last measured parts and the tokens added since then counted as messages (or the parts labelled "as of "), and the ring stays visible from the moment a message is sent.

Evidence

  • The card offers details only when usage.snapshot has categories: ThreadContextWindowIndicator.tsx#L33-L35, button at #L149.
  • extractThreadContextWindowUsage keeps the snapshot only while snapshot.usedTokens === usedTokens: thread-context-window-usage.ts#L135-L141. Claude Code's mid-turn thread/contextWindowUsage/updated events carry a total but no snapshot, so the snapshot drops at the first mid-turn update. In one thread's log after a send, every usage event until the reply ended had snapshot absent (e.g. used=204392 snap=false, used=205194 snap=false); the last one before the send had used=203821 snap=true.
  • The follow-up composer draws the ring only while contextWindowUsage is set: FollowUpPromptBox.tsx#L825-L826. The server's head state reads all usage rows since the last context clear (thread-head-state.ts readThreadContextWindowUsage) and returned a value mid-turn when checked, so if the ring does vanish after a send, the gap is probably client-side. Cause unverified.
  • A plugin workaround (its own ring reading threads.context plus the thread/contextWindowUsage/updated history for the last snapshot) keeps both visible mid-turn, but it duplicates bb's ring, so we removed it.

What you ruled out

Suggested priority and effort (optional)

Low to medium: no data loss; the workaround is waiting for the reply to end. It hits every long turn, which is when the context is filling up.

Checks

  • I reproduced this on the latest release or on main, or I say above that I could not.
  • I searched open and closed issues for the same problem.
  • If an agent wrote this, the body ends with > AGENT GENERATED and links the thread or report.

Filed by an agent from a local bb thread (no public link).

AGENT GENERATED

Activity

  1. added theissue type on Nov 26, 2026
  2. added
    ui
    provider-claude-code
    partial-repro
    on Nov 26, 2026
  3. bb-slop-cop commented on Nov 26, 2026

    @bb-slop-cop
    Contributor

    🚨 SLOP COP 🚨 · new-issue-autopilot

    • Classification: Bug · Priority Medium · Effort Medium. Labels: ui, provider-claude-code, partial-repro.
    • Reproduction and root-cause report: PARTIALLY REPRODUCED, with high confidence in the breakdown-loss root cause. Projection and production React-rendering regressions fail identically in two clean-source runs on trusted main.
    • Root cause: the shared projection selects the snapshot only from the newest usage event. An aggregate-only update therefore drops the measured categories, and the card removes its details button. Removing the final token-equality check alone would not fix this.
    • Limits: the ring disappearing after send remains unverified. No live desktop/provider reproduction or screenshot; Chrome/Chromium was unavailable.
    • No PR: preserving historical breakdowns requires an explicit freshness contract rather than silently weakening the existing snapshot invariant, outside the simple-fix gate.

    AGENT GENERATED

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    partial-reproprovider-claude-codeui

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions