Connect Claude Code
A one-time setup in Claude Code's settings.json turns on exact limits and real-time session activity.
Shows: exact 5-hour and weekly limits, real-time session status, pending permissions/questions waiting for you, and optional 30-day Anthropic API spend.
Reading sources
- Claude Code
statusLinein the terminal (exact): after each terminal reply, Claude Code passes exact account limits to QuotaDesk's script, valid as exact for 30 minutes. - Claude desktop app history: when
statusLineis unconfigured or over 30 minutes old, QuotaDesk uses local desktop history as a fallback and marks numbers with~(estimated). - Local hooks: report in real time whether a session is working, waiting for you or idle.
- Anthropic API (optional): configured in Settings › Connections › + Add with your own Admin/Analytics key to track 30-day USD spend separately.
1. Locate QuotaDesk's statusLine script
When you launch QuotaDesk v0.5.0, it automatically writes and maintains the script inside its local profile folder:
%LOCALAPPDATA%\com.quotadesk.opensource.dev\claude-statusline.ps1
- Replace
<your-user>with your Windows username for the full path (C:\Users\<your-user>\AppData\Local\com.quotadesk.opensource.dev\claude-statusline.ps1). - If you upgraded from an earlier release (
.NET 10.0/0.4.0), make suresettings.jsondoes not still point to a legacy folder (Desktop\Git Projects\...or%LOCALAPPDATA%\Programs\QuotaDesk), otherwise the new app will not receive exact statusLine readings.
2. Edit Claude Code's settings.json
- Close active Claude Code sessions.
- Back up
%USERPROFILE%\.claude\settings.json(create{}if missing). - Add or update the
statusLineentry pointing to the v0.5.0 script (doubling backslashes\\):
"statusLine": {
"type": "command",
"command": "powershell.exe -NoProfile -ExecutionPolicy Bypass -File \"C:\\Users\\<your-user>\\AppData\\Local\\com.quotadesk.opensource.dev\\claude-statusline.ps1\""
}
If you also want live pending-request alerts and typing/thinking animation, merge the hooks section from claude-settings-additions.template.json (loopback port 127.0.0.1:32871) into your existing hooks. Claude Code supports one statusLine.
3. Verify it works
- With QuotaDesk running, open Claude Code in the terminal and send any message.
- The Claude card displays exact limits without
~, saving only timestamp, percentage and reset window in%LOCALAPPDATA%\com.quotadesk.opensource.dev\claude-limits.json. - When Claude asks for permission or input, the bell icon shows the pending count and Windows displays a notification.
Troubleshooting
| Symptom | What to do |
|---|---|
No quota data or ~ values | Verify statusLine in %USERPROFILE%\.claude\settings.json points to %LOCALAPPDATA%\com.quotadesk.opensource.dev\claude-statusline.ps1 and send one terminal message. |
| Legacy path after upgrading | Replace any old .NET 10.0 / repo script path in settings.json with %LOCALAPPDATA%\com.quotadesk.opensource.dev\claude-statusline.ps1. |
| Local port 32871 busy | Another process uses the hooks port or another instance is running. Close duplicate instances and reopen. |
| Activity state never updates | Ensure hooks is merged into settings.json and restart your Claude Code session. |
Privacy
claude-statusline.ps1 records only reading timestamp, percentage used and reset time for the 5-hour and weekly windows. Hooks send only session id, tool name, notification type and folder name — QuotaDesk never reads Claude credentials or prompts/responses.