You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
bug(desktop): context usage remains stale after compaction #5547
After successful context compaction, the Desktop composer's context-usage gauge can continue displaying the token count/percentage from the pre-compaction request. That measurement describes the old prompt, so presenting it as current usage is misleading.Most users are sensitive to context usage. If the displayed usage still reflects the pre-compaction amount, they may think compaction didn’t succeed.
Expected: keep the existing gauge icon and display the localized Usage / 用量 label until a subsequent provider request supplies a fresh measurement. The tooltip should read “Context has been compacted. Usage will update when the next request completes.” (简体中文:上下文已压缩,用量将在下一次请求完成后更新。), with equivalent Traditional Chinese copy. Restore the percentage when a fresh measurement becomes available. A failed-open compaction should retain the valid reading because the raw history was still sent.
How to reproduce
Run a Desktop conversation until a provider request has reported token usage and the composer displays a percentage.
Run /compact successfully.
Before another provider request settles, inspect the context gauge: it can still show the previous percentage.
For mid-turn compaction, the indicator should recover as soon as a post-compaction request settles, without waiting for the entire turn to finish.
Environment
Surface: Desktop (conversation composer and WorkHub composer)
Source baseline: feb9cf22f
Identified from source and regression tests; no specific OS/provider restriction established.
Activity
faga295 commentedon Sep 20, 2026
take
fix(ui): order usage anchors against the compaction apply time
docs(runtime-host): cover the compaction note kind in the epoch-205 note
docs(changelog): name the compaction apply-time boundary row
fix(ui): order usage anchors against the compaction apply time
docs(runtime-host): cover the compaction note kind in the epoch-205 note
docs(changelog): name the compaction apply-time boundary row
fix(ui): order usage anchors against the compaction apply time
docs(changelog): name the compaction apply-time boundary row
fix(runtime): forward compaction boundaries while a turn is running
fix(ui): order usage anchors against the compaction apply time
docs(changelog): name the compaction apply-time boundary row
fix(runtime): forward compaction boundaries while a turn is running
fix(ui): order usage anchors against the compaction apply time
docs(changelog): name the compaction apply-time boundary row
fix(runtime): forward compaction boundaries while a turn is running
fix(desktop): show unknown context usage after compaction (#5548)