Agent Usage BarSee Claude Code and Codex usage, reset times, and pace directly in the VS Code status bar. Usage is read at the account level, not inferred from local activity, so activity from other machines, terminals, and editors is included. No configuration is required. Both providers are enabled by default and refresh automatically.
What it showsOne status bar item per provider, each with its own monochrome glyph:
By default, the item turns yellow when usage reaches the warning threshold and red at the error threshold. Set Hover to see the plan name, a themed progress bar for each window, exact reset times, pace, any credit balance and when the soonest reset credit expires, and the last refresh error. The bars use the same warning and error thresholds as the status item. The tooltip also links to refresh and settings. Click either status item to toggle that provider, refresh usage, or open settings. PaceBeside each window's reset time, the tooltip says where that window is heading:
Only the 5-hour window is forecast. It opens on your first message, so its elapsed time roughly follows working time. The weekly window starts from a calendar anchor and continues through nights and days off. Forecasting from a busy Monday could therefore predict a limit by Thursday even when the rest of the week is quiet. For that window, the tooltip shows elapsed time instead of a forecast. The weekly bar also carries a mark standing where that elapsed percentage falls, so a glance says whether spending is ahead of the week or behind it. The mark is left off where it would say nothing: under the bar's rounded ends, or right beside the edge of the fill, which is the same comparison. Pace remains hidden until the window has been open for fifteen minutes, and the 5-hour forecast also requires at least three percent usage. These minimums prevent rounded early values from being presented as a meaningful rate. Set
Daily activityUnder the windows, the tooltip draws the last thirty days as one bar per day: the busier the day, the taller and darker the bar; a day the agent was not used is a flat mark on the baseline. Each day is placed in one of five steps relative to the busiest day in view, so a bar says which band a day fell in — twice the height is not twice the work. The days are counted from the session transcripts both agents already write on this machine, so the strip is complete on the first hover and includes work done outside VS Code. Only recorded numbers and times are read from those files; see Data access. Each provider is measured in the unit it records, and the two are never compared:
A day from before the first scan is drawn like an unused one. That matters for Claude Code, which deletes its transcripts after One reading for every windowEvery VS Code window runs its own copy of an extension. Without coordination, six open windows could make the same request six times and briefly show different readings. The windows in one VS Code profile instead share the latest reading and the network refresh schedule:
VS Code shares the extension state between windows in the same profile. That state contains the latest result and the time its read began. A window that finds a recent shared result displays it instead of requesting another one. When the configured interval expires, whichever window notices first can attempt the next read. There is no elected leader. The window that completed the previous read gets a short head start, which usually keeps subsequent reads in the same window. When several windows become due together, they write a shared claim, wait briefly for it to propagate, and check it again before making a request. This is coordination through VS Code state, not an atomic lock. A rare tie can produce one duplicate request, but cannot replace a newer published reading with an older one. Requirements
Neither is required for the other. A provider that is not installed or not signed in says so in its tooltip; switch it off in the settings and its item disappears. InstallSearch for Agent Usage Bar in the Extensions view, or install it from the VS Code Marketplace or Open VSX. To install a
SettingsRun Agent Usage Bar: Open settings, or click either status bar item and pick Open settings.
In When the locale setting is empty, dates and times follow VS Code's display language rather than the operating system's regional settings. For example, VS Code in English uses US-style dates even when the operating system uses another region. Set a language tag such as Each provider has its own monochrome mark. Set a label to replace it with a plain string or a codicon reference such as TroubleshootingAfter a refresh failure, the last good reading remains visible instead of being replaced with an empty value. The tooltip states what happened and, when an action can help, shows it on a separate line under a lightbulb.
Rate limited. A A macOS keychain prompt was declined. The extension waits half an hour before trying again, preventing a new prompt on every five-minute refresh. Run Agent Usage Bar: Refresh usage to retry immediately. The numbers look old. A history icon and tooltip note appear when a reading is more than ten minutes old. Refresh from the menu to request a new reading without the normal minimum interval. Nothing appears in a Remote-SSH, WSL, or dev container window. The extension runs beside the local VS Code user interface and reads local agent sign-ins. See Platform scope. Data accessAccount usage cannot be calculated reliably from activity on one machine, so the extension asks each provider for the account-level reading. The credential boundary for those requests is described below. CodexThe extension starts Claude CodeThe extension reads the token stored by Claude Code, uses it for one request, and discards it. The request goes to The token is never logged, cached, or written back to shared state, settings, or the extension's secret storage. Caching it would create a second credential store that could become stale when Claude Code rotates the token or signs out. Reading the existing store when needed avoids that additional copy. The extension also never refreshes the token. Refreshing can rotate the stored credential, and competing with Claude Code for that update could invalidate Claude Code's own session. When the token expires or is rejected, the extension reports it and leaves renewal to Claude Code. Where the token lives depends on the platform:
The store belongs to Claude Code and is shared by the CLI and the official Claude Code extension, which includes its own copy of the CLI. Signing in through either one therefore creates the same credential. The Claude desktop app uses a separate encrypted store that this extension does not read. Reading the macOS keychainThe extension reads the keychain with The credentials file is checked first on every platform because Claude Code uses it when the keychain is unavailable. A normal macOS keychain read therefore starts one short-lived process; normal reads on other platforms start none. Normally, reading the item through
The extension distinguishes these outcomes through the exit code returned by Agent transcriptsThe extension watches Those files are also read, for the daily activity strip only. They contain your prompts and your code, so what is taken out of them is worth stating exactly. Each line is parsed as JSON and one of two things is kept:
Nothing else is read out of a parsed line, and no message, prompt, file path, or file content is kept, stored, logged, or shown. The daily totals that result are numbers per calendar day, and they are the only thing derived from a transcript that outlives the scan. Setting A first scan reads every transcript once. Later scans read only files modified since the last one, which is normally the session currently being written, and no scan runs within two minutes of another window's. Codex also sends an Every automatic read has a minimum interval of one minute per provider, regardless of which trigger requested it. A long agent turn can write its transcript in several bursts, and those small updates do not justify a request each. A manual menu refresh bypasses this minimum. When the Anthropic usage endpoint refuses a read with a stated wait, that wait is honoured, by the manual refresh too. When it refuses without one, the extension waits a minute, then doubles the wait on each further refusal up to fifteen minutes, so a limit shared with other clients is not kept tripped by the retries themselves. Any answer that is not a refusal resets the wait, and windows share the count. What is stored, and what never leavesThe Anthropic usage endpoint is the extension's only direct network target. The extension opens files only for parsing and performs no direct filesystem writes.
The shipped text leaves two things for code review to establish. The URL allowlist can inspect only addresses written out in full; a URL assembled from parts at runtime is outside its reach. Likewise, because the program passed to It persists exactly three things, all through VS Code's own APIs:
No stored value contains a token, prompt, or file content. The extension has no telemetry, runtime dependency, custom credential path, or custom update mechanism. No prompt, source code, or file content is sent anywhere. Platform scopeDesktop VS Code on Windows, macOS, and Linux, hand-tested on all three against real installs of both agents. The per-platform paths are covered by tests on all three CI runners as well: the Codex install layouts, the macOS keychain read, and the file watcher against the real The extension runs on the same machine as the VS Code user interface, where both agents keep their sign-ins. In a Remote-SSH, WSL, or dev container window, it therefore reports usage for the local account. It does not read an agent sign-in that exists only on the remote side. There is no web build. It reads local files and starts a local process, neither of which exists in a browser. ContributingSetup, the architecture, the scripts, and how the provider glyphs are built are all in CONTRIBUTING.md. Security reports go through SECURITY.md. License and trademarksMIT; see LICENSE. The icon font in Claude and Anthropic are trademarks of Anthropic. Codex and OpenAI are trademarks of OpenAI. The monochrome provider glyphs are used solely to identify the services whose usage is being displayed. This project is independent and is not affiliated with, endorsed by, or sponsored by Anthropic or OpenAI. Either glyph can be replaced with your own text or a codicon; see Settings. |