BrainDrain CCYou can't manage what you can't see. Claude Code doesn't show context usage until it warns you — and by then you're already degraded. BrainDrain CC puts a live percentage in your status bar, color-coded green → yellow → red, so you see it coming. Works in VS Code, Antigravity, and other VS Code forks.
Why BrainDrain CC
InstallSearch for BrainDrain CC in the VS Code Extensions panel, or install from the command line:
For VS Code forks like Antigravity, download the Restart any running Claude Code sessions after installing. The extension sets up everything automatically. How it worksClaude Code has a statusline feature that exposes context window data as JSON. BrainDrain CC uses this in two parts:
Each VS Code window shows the context for its own workspace. Multiple concurrent Claude Code sessions are supported — one per project directory. Why not just use
|
| Setting | Default | Description |
|---|---|---|
braindrain-cc.pollInterval |
15 | How often to check for updates (seconds) |
braindrain-cc.warningThreshold |
60 | % at which indicator turns yellow |
braindrain-cc.dangerThreshold |
80 | % at which indicator turns red |
braindrain-cc.systemOverhead |
18000 | Estimated system token overhead (invisible to statusline). Increase if BrainDrain underreports vs Claude's "Context low" warning |
Known issues
Accuracy depends on system overhead. Claude Code uses hidden tokens (system prompt, tool definitions, MCP configs, CLAUDE.md) that aren't reported in statusline data. BrainDrain compensates with a configurable systemOverhead setting (default 18,000 tokens). If your percentage consistently underreports compared to Claude's "Context low" warning, increase this value.
Status bar stops updating on macOS. Claude Code has an upstream bug (#32660) where the statusline command can silently stop firing on macOS. When this rarely happens (usually after "/resume", but not always), BrainDrain shows a stale percentage or stays at 0%. Restarting the Claude Code session usually fixes it. No workaround exists at this time.
Workspace matching. The status bar shows context for the Claude Code session whose project directory matches the VS Code workspace folder. If you run Claude Code from a different directory than the one open in VS Code, BrainDrain won't pick it up. This is by design — the status bar belongs to the workspace.
Icon differences across editors. In VS Code, the status bar shows a Claude icon alongside a lightbulb. In forks like Antigravity that don't include newer codicons, only the lightbulb appears. Functionality is identical.
Privacy
No API calls, no telemetry, no runtime dependencies. Everything runs locally using Claude Code's own statusline data.
Not affiliated with Anthropic
This is a community tool. Not made by, endorsed by, or affiliated with Anthropic.
Version History
v0.4.1 — Extension icon for Marketplace.
v0.4.0 — New status bar icons (Claude + lightbulb, cross-fork compatible). System overhead compensation for more accurate context percentage (systemOverhead setting). Works with both 200k and 1M context windows. Rewritten README.
v0.3.2 — Added search keywords for Marketplace discoverability.
v0.3.1 — Stable workspace matching via project_dir. Bridge error logging to ~/.claude/braindrain/bridge.log. Published to VS Code Marketplace.
v0.3.0 — Accurate context percentage (includes output tokens). Stale session cleanup. Session tracking via Terminal Shell Integration API.
v0.2.0 — Multi-session support, three display states, auto-setup of bridge script.
v0.1.0 — Initial release.