[FEATURE] VSCode Extension: Display context usage percentage in UI
Status Fixed / completed
Reported on v2.1.7
Maintainer reply ✓ Yes — bcherny
Activity 21 comments · opened Jan 16, 2026 · closed Aug 17, 2026
💡 Likely answer: A maintainer (bcherny, collaborator)
responded on this thread — see the highlighted reply below.
Feature Request
Problem
The CLI version of Claude Code supports custom status lines that can display context usage percentage, but the VSCode extension has no visibility into context consumption. Users must manually run /context to check usage.
This matters because Claude's response quality can degrade as context fills up (commonly cited around 40%). Without visibility, users don't know when to run /compact to maintain optimal performance.
Proposed Solution
Add a persistent context usage indicator to the VSCode extension UI, showing:
- Current context usage percentage (e.g., "Context: 30%")
- Visual warning states:
- 🟢 Green: < 35%
- 🟡 Yellow: 35-45% (suggest /compact)
- 🔴 Red: > 45% (strongly recommend /compact)
Bonus Features (nice to have)
- Configurable threshold warnings
- Optional notification/toast when crossing thresholds
- Auto-suggest
/compactwhen hitting warning threshold
Context
- The CLI
statusLinefeature doesn't work in VSCode extension - Tool Search (v2.1.7) helps reduce MCP tool overhead, but conversation context still grows
- Power users track the "40% rule" manually - this should be built-in
Environment
- Claude Code: 2.1.7
- VSCode Extension
- macOS
21 Comments
we really need this
I swear I thought it was always on, but turns out it's not? How hard is it to just always make it visible? It's pretty useful.
Adding my use case. I run the VS Code extension via Remote-SSH on Linux (WSL2), so this isn't macOS-specific.
The extension previously showed a context percentage that updated as the conversation progressed. That indicator has disappeared in recent versions. The CLI
statusLinesetting works in the terminal but doesn't surface in the VS Code chat panel, so there's currently no passive way to monitor context usage from the extension.Without it I end up either running
/contextmanually every few messages or just guessing when to start a new conversation. A persistent indicator (status bar, inline, wherever) would remove that guesswork. Even a basic percentage without the colour thresholds would be a meaningful improvement.This feels like much more of an issue than an enhancement: Knowing the percentage of context is crucial to avoiding context rot, a core limitation of Claude (or any LLM for that matter). I relied heavily on knowing this information for determining my own expectations in a given session and when to start a fresh session. I hope to see this bumped.
As far as I remember this was always visible, but now today it is gone? Why would you ever remove this extremely useful feature?
This seems visible until context used up to 50%+ in orange/red. I never see the pie chart before 50%.
I'm wondering whether this has something to do with the new 1M context window that was recently introduced. If the context only shows up at 50%... that would now be 500k tokens, which is A BIG context window (relative to the previous one). I actually find that going above 20-30% in the new 1M context window is not great for my kind of work... maybe there should be a reconsideration of when and how this information is presented now that the context window is so large and results in non-linear and earlier degradation in Claude's performance?
EDIT: If you find yourself here with a now broken workflow due to context rot from the 1M token window, quick solve is to update your claude settings.json with the following:
"env": {"CLAUDE_CODE_DISABLE_1M_CONTEXT": "1"
},
Ever since 1M tokens became the default I have not seen the context usage indicator anymore. I tried setting
CLAUDE_AUTOCOMPACT_PCT_OVERRIDEto a 5% thinking maybe it would re-appear at 50% of that amount, but this just makes it auto-compact without warning. There really should be a separate setting that controls when the indicator shows, because 50% is way too much for a 1M token context.I built this extension a few months back that handles this issue:
https://github.com/makingaipractical/claude-code-fuel-gauge
It puts a live percentage in your VS Code status bar from 0%, color-coded green → yellow → red.
Works with both 200k and 1M context windows and works across multiple simultaneous sessions. I actively update it when things change (and will continue until it's not needed anymore) :)
You can find it in the VS Code Marketplace as well.
I've seen a lot of people are looking for something like this, so I decided to post this here. Hope it helps.
How is this still not fixed / addressed? @claude we need a way to see our context window in real time, please. Right now we can only see our context window stats by manually typing /context or reverting back to CLI and not using the very cool VSCode Extension.
Just another user chiming in to say I'd love to have this feature implemented :)
+1 — this would significantly improve day-to-day work in the VS Code extension.
As a developer working with large domain-specific source files, I regularly run into
situations where the context window fills up faster than expected. Right now the only
way to check usage in the extension is to manually run
/contextor/usage, whichinterrupts the flow — and by the time you think of checking, it's often because
something already went wrong (auto-compact kicked in, or responses degraded).
A few points in favor of prioritizing this:
statusLine— the extension is the only surfacewhere context usage is invisible. The data is clearly available internally (the
extension knows when to trigger auto-compact), it just isn't surfaced to the user.
A quick search shows at least a dozen closed duplicates of this exact request
(#66021, #57721, #58159, #52468, #44849, #20207, #52156, #33819, #44469, #16526,
#38791...), plus reports like #37575 and #39503 suggesting an indicator existed
in the native UI before ~v2.1.81 and was removed. The demand is clearly persistent.
approaching a threshold, I can proactively
/compact, start a fresh session ata natural boundary, or trim what I attach — instead of losing work quality
mid-task without warning.
Even a minimal version — a small percentage badge in the input bar area (where the
indicator seems to appear only at high usage today) that is always visible —
would cover the core need. A tooltip with the token breakdown on hover would be
a bonus, not a requirement.
Thanks for considering this!
I built an open-source VSCode extension that shows exactly this, in case it's useful while there's no native indicator — disclosure: I'm the author.
Claude Todos adds a sidebar panel with a persistent context usage indicator: a "{pct}% ctx" badge plus a thin bar with traffic-light warning states (green < 60%, yellow 60–85%, red ≥ 85%). It's computed from the transcripts Claude Code already writes to
~/.claude/projects(input + cache tokens of the latest message, with the 200k/1M window detected per model), so it updates live no matter whereclauderuns — integrated terminal, external terminal, another window — as long as the session's cwd matches the open workspace. The same panel also shows per-model token usage, cache efficiency, and the live TodoWrite/sub-agent task list.It's a sidebar panel rather than the inline statusline this issue asks for, but it gives you the always-visible percentage today. Fully local (no telemetry, read-only), MIT. Repo: https://github.com/carlosdealmeida/claude-todos-vscode
Just another message of support for this feature request, would be great to have official support rather than having to use 3rd party plugins (which I would rather not).
Chiming in to voice my support for this feature request
I can't believe this is actually open after 7 months. I can only conjecture that the devs don't even use code editors like VSCode anymore.
This omission feels intentional and disrespectful at this point... do better Anthropic.
The VS Code extension now has a built-in context indicator: the prompt box shows how much of Claude's context window is in use, and Claude auto-compacts when needed (or run
/compactyourself). Threshold coloring/notifications aren't there yet, but the core visibility ask is covered.Shipped in a recent release — changelog: https://github.com/anthropics/claude-code/blob/main/CHANGELOG.md
Docs: https://code.claude.com/docs/en/vs-code
🤖 Generated with Claude Code
With 1M context tokens the indicator only shows up when you're already at 500k tokens, that's way too late. This should be lowered to 35~45% as initially proposed, and/or allow users to configure this value.
I think it would be helpful to be able to hover over it and see both day and week usage at any time, like how you can hover over the copilot icon at any time to see usage, it saves having to go into a submenu to see the current usage.
What version is this in? I don't see it in the prompt box in vs code (Ubuntu or Windows) nor mentioned explicitly in the release notes. I do see it in the documentation. I'm fully up to date too.