Context window indicator shows higher fill immediately after compacting conversation than actual

Open
#321,648 0 comments 0 reactions 1 assignee View on GitHub

@lramos15 is already working on this.

Since Jun 22, 2026.

Assessment

This issue has not been assessed yet.

Description

Version: 1.124.2 (Universal)
Commit: 6928394f91b684055b873eecb8bc281365131f1c
Date: 2026-06-12T00:12:36Z
Electron: 42.2.0
ElectronBuildId: 14159160
Chromium: 148.0.7778.97
Node.js: 24.15.0
V8: 14.8.178.14-electron.0
OS: Darwin arm64 25.1.0

Steps to Reproduce

  1. Have an ongoing session that fills a noticeable portion of the context window
  2. Trigger a compact of the conversation (button or /compact)
  3. Observe the context window indicator immediately after compacting completes.

Expected Behavior

Immediately after a compact, the indicator should reflect the reduced context size, showing a lower fill level than before compacting.

Actual Behavior

Immediately after compacting, the indicator shows a 2x higher fill level than before the operation. The value is only corrected after the conversation continues, at which point the indicator updates to the correct, lower size.

Impact

Misleading context-usage feedback right after a compact, which is precisely when the user expects to see freed-up space. This can cause users to believe the compact had no effect or made things worse.

Video:
https://github.com/user-attachments/assets/6c29f74d-a3ef-4d53-8f5b-b9260b542ea9

Dominant language
TypeScript
Stars
193k
Forks
42.9k
PR merge metrics
PR metrics pending

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from microsoft/vscode

All issues in microsoft/vscode

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.