A VS Code extension that adds status bar items for managing Claude Code: a model and account picker, a permission mode toggle, live token usage display, and a background task monitor. Also adds a button to the Source Control panel that generates commit messages with Claude.
Renamed from Claude Switcher. Settings moved from the claudeSwitcher.* namespace to claudeToolbar.*, and commands from claude-switcher.* to claude-toolbar.*. Nothing breaks if you upgrade without touching your config: old setting names are still read (the new name wins if both are set), and the old command ids still work in keybindings.json. VS Code will show the old settings as deprecated — rename them when convenient, since the fallback will be dropped in a future release.
Sign-in Requirements
| Feature |
Sign-in required |
| Model switcher |
No |
| Account switcher |
Handles sign-ins itself |
| Background tasks |
No |
| Permission toggle |
No |
| Usage bar |
Yes (claude auth login) |
| Commit message generator |
Yes (claude auth login) |
The usage bar and commit message generator read your Claude OAuth token from the macOS Keychain, or from ~/.claude/.credentials.json on Windows and Linux.
Status Bar Items
All items appear in the bottom-left status bar, just to the right of the Problems indicator.
| Item |
Id |
Description |
| Model picker |
model |
Model the active session is running — click to switch models or accounts |
| Permission toggle |
permissions |
Current permission mode — click to toggle |
| Session usage |
sessionUsage |
5-hour session usage and time until reset |
| Weekly usage |
weeklyUsage |
7-day usage and time until reset |
| Background tasks |
tasks |
Count of Claude background agents/processes — click to view or kill |
Usage percentages are color-coded: green below 60%, yellow 60–80%, red 80%+. The session and weekly items only appear when on the Default (Claude) model and usage data is available.
Hiding and Reordering Items
Use claudeToolbar.statusBarItems to control which items are shown and in what order. The array lists item ids left to right; remove an entry to hide that item. For example, to hide the permission toggle and move usage in front of the model picker:
"claudeToolbar.statusBarItems": ["sessionUsage", "weeklyUsage", "model", "tasks"]
Changes apply immediately — no reload needed. Hidden items' commands remain available from the Command Palette.
Installation
Install Claude Toolbar directly from the VS Code Marketplace.
To build and install from source instead, clone this repository, then from its root:
If code isn't on your PATH, add it first: open VS Code, press Cmd+Shift+P, and run Shell Command: Install 'code' command in PATH.
npx @vscode/vsce package
code --install-extension claude-toolbar-1.0.3.vsix
Then reload VS Code.
Configuration
Add providers to your settings.json:
"claudeToolbar.models": [
{
"baseUrl": "http://localhost:1234",
"authToken": "lmstudio",
"models": [
{ "model": "qwen/qwen3.6-35b-a3b", "name": "Qwen 3.6 (Local)" }
]
}
]
Multiple providers and multiple models per provider are supported. Each model appears as its own entry in the picker.
| Field |
Description |
baseUrl |
Sets ANTHROPIC_BASE_URL |
authToken |
Sets ANTHROPIC_AUTH_TOKEN |
models[].model |
Sets ANTHROPIC_MODEL |
models[].name |
Label shown in the picker |
Model Switcher
Click the model item and choose a model. Select Default (Claude) to clear all overrides and use the Anthropic API directly.
The item shows the model the active Claude Code session in this window is really running, not what the settings say. A session's model is fixed when it spawns, so settings edits — and /model changes made inside another conversation — don't apply to sessions already open. The model is read from the active session's transcript, which is the only live record of it. The tooltip shows both: the active session's model, and what a newly opened session will start on.
"Active" means the focused Claude Code panel when it can be identified, otherwise the session in this window with the most recent activity — so it follows you as you move between conversations, updating within a second or two. Sessions in other VS Code windows are ignored: they're matched to this window by process tree, falling back to workspace folder for sessions started from a terminal.
Account Switcher
Switch between two or more signed-in Claude accounts from the same picker as the model switcher. Add named accounts to settings.json:
"claudeToolbar.accounts": ["personal", "work"]
List the account you are currently signed in to first — on first use, the current sign-in is saved under the first name in the list.
How it works:
- Picking an account you haven't signed in to yet clears the live Claude Code credential, so Claude Code presents its sign-in flow (run
/login in the Claude panel if it doesn't prompt). Once signed in, that account is captured automatically.
- Picking an account you've signed in to before restores its saved credentials instantly. The account you're leaving is snapshotted first, so you can switch back and forth freely.
- A switch moves two things: the OAuth token, and the account-scoped fields in
~/.claude.json (oauthAccount plus the model-access, org-default and usage caches keyed to it) — the same set Claude Code clears on /logout. Swapping only the token leaves Claude Code showing the account you just left, because it keeps a cached profile that still looks valid. Preferences, project history and everything else in that file are left alone.
- The session and weekly usage numbers are cleared the moment the switch lands, in every open window, and refetched against the new account. Utilization and reset countdowns are per-account, and the shared usage cache is only refreshed every 3 minutes — without the reset you'd be looking at the limits of the account you just left.
- The window reloads automatically after each switch — that is what makes Claude Code pick up the new account. Restarting just the extension host isn't enough: it only replaces processes the host spawned, so anything else in the window still holding the old credential survives and the switch looks like it didn't take. Dirty editors survive the reload via VS Code's own hot-exit backups. A
claude you started in an integrated terminal is restored with the terminal rather than killed, so restart that session (or turn off terminal.integrated.enablePersistentSessions) if it keeps reporting the old account.
Security: account names in settings.json are just labels. The credentials themselves are stored via VS Code SecretStorage, which is encrypted by your OS keychain — they are never written to settings.json or any plain-text file. The live credential lives wherever Claude Code itself keeps it (macOS Keychain, or ~/.claude/.credentials.json on Windows/Linux). The saved account profiles are not secrets — they are the same non-sensitive identity and cache fields Claude Code already keeps in plain text in ~/.claude.json — so they live in VS Code's extension state rather than the keychain.
Background Tasks
A $(server-process) N status bar item shows how many Claude background tasks are running, polled every 5 seconds. This counts:
- Background Claude agents —
claude CLI processes spawned by another Claude process or detached from any session, which you can't stop from the Claude Code panel
- Processes started by Claude — shells, dev servers, watchers, and other descendants of any running Claude process
Click the item to see the list grouped by kind, multi-select entries, and kill them (SIGTERM on macOS/Linux, taskkill /T /F on Windows).
Permission Toggle
Click the shield/warning icon to toggle between two modes:
| Icon |
Mode |
Effect |
$(shield) |
Default |
Standard Claude Code permission prompts |
$(warning) |
Bypass |
Sets claudeCode.allowDangerouslySkipPermissions: true — skips all prompts |
The icon reflects the live value of claudeCode.allowDangerouslySkipPermissions in your settings.
Usage Bar
When on the Default model, two items show Claude Code token usage pulled from the Anthropic OAuth API:
- Session — percentage of the 5-hour rolling limit used, plus time until it resets (
3h 12m)
- Weekly — percentage of the 7-day rolling limit used, plus time until it resets — days and hours (
2d 5h), or hours and minutes (7h 32m) on the last day
Data refreshes whenever the CLI updates the data file and on a 3-minute poll interval. Both items hide automatically when no data is available.
Commit Message Generator
A sparkle button appears in the Source Control panel title bar. Click it to generate a conventional commit message for your currently staged changes using Claude Haiku. Stage your changes first (git add), then click — the message is written directly into the commit input box.
The staged diff is not sent verbatim. Files are sorted into tiers — source, build/config, tests, docs, assets, generated — and the character budget is spent from the top down, so the code that carries the intent of the commit is what the model actually reads:
- Lockfiles, build output, snapshots and other generated files are listed by name and line count but never consume diff space, so a 500-line
package-lock.json churn can't drown out a three-line fix.
- Tests and docs can't be given more diff space than the source changes they accompany. This is what stops a large test rewrite from being labelled
test: when the real change was the bug fix underneath it.
- Every staged file appears in a manifest with its status and
+/- counts even when its diff was dropped, so the whole shape of the commit is always visible.
- Your last 10 commit subjects are included as a style reference, so generated messages match the conventions already in the repo.
| Setting |
Default |
Effect |
claudeToolbar.commitMessage.maxDiffChars |
40000 |
How much diff to send. Lower it for a local model with a small context window. |
claudeToolbar.commitMessage.subjectMaxLength |
72 |
Subject line limit, including the type(scope): prefix. |
claudeToolbar.commitMessage.includeBody |
false |
Add a bulleted body covering the secondary changes. |
License
MIT — see LICENSE.