Repository navigation
Description
Summary
With Claude Code's autoCompactWindow set to 256000, bb's context ring shows
256K after a turn, then 1M while the next turn runs, and returns to 256K after
that turn. The two denominators describe different things: the configured
auto-compact window and the model's context capacity. This makes the same ring
change scale during normal agent activity.
Reproduction
- Use bb 0.44.0 with the Claude Code provider and a Claude model whose
modelUsage.contextWindowis 1M. - Set Claude Code's
autoCompactWindowto256000. - Complete a turn and observe the context ring at 256K.
- Start another turn and observe the ring while the agent is working. It
changes to 1M, then returns to 256K after the post-turn context snapshot.
The event trace below came from bb thread log <thread-id> --all --json in
bb 0.44.0. The raw thread log is omitted because it contains conversation
content.
| Sequence | Event | modelContextWindow |
snapshot.contextWindowTokens |
|---|---|---|---|
| 16750 | turn/completed |
— | — |
| 16751 | thread/contextWindowUsage/updated |
256000 | 256000 |
| 16752 | turn/started |
— | — |
| 16756 | thread/contextWindowUsage/updated |
1000000 | absent |
| 16758 | thread/contextWindowUsage/updated |
1000000 | absent |
The same pattern repeats at seq 16861 (256000 with snapshot), 16867 and
16869 (1000000 without snapshot), and 16872 (256000 with snapshot).
Expected behavior
The native ring should keep the latest Claude auto-compact snapshot's
contextWindowTokens (256K here) as its denominator throughout subsequent
turns, while still updating the used-token estimate. A streamed model-capacity
value should not replace that display denominator while the auto-compact
window is active. The underlying 1M model capacity should remain available.
Code pointers
In the installed bb 0.44.0 bundle under node_modules/bb-app/:
server/dist/builtin-plugins/provider-claude-code/dist/host.js:208calls
session.getContextUsage()after a turn and publishes
snapshot.contextWindowTokensas the context-window size.- The same
host.js:196extractsmodelUsage.contextWindowfrom Claude SDK
messages for the streamed context event. server/dist/start-server.js:62035-62087selects the latest usable context
event, so the next streamed 1M event replaces the 256K snapshot in the
indicator's input.
Related source at the bb 0.44.0 source baseline (0baa605b):
snapshot publication,
context normalization,
SDK extraction,
latest-event projection,
and ring rendering.
Could the indicator retain the most recent auto-compact snapshot window
through later estimated stream events? A regression case with the alternating
event order above would make the behavior testable.
Activity
SawyerHood commentedon Sep 30, 2026
Verified report: https://get-bb.github.io/reports/issues/4441.html
PARTIALLY REPRODUCED in two clean checkouts at the same recorded SHA. Synthetic provider metadata produces the displayed 256K → 1M → 256K scale change; live Claude configuration and turn lifecycle remain unverified. Both-run evidence and genuine screenshots are included.