Claude usage limits:
- Reads a fresh helper snapshot from
%LOCALAPPDATA%\trafficmonitor-claude-usage-plugin\claude-web-usage.json - The helper signs in through its own local Edge or Chrome profile, reads the saved Claude cookies from that profile, and calls
https://claude.ai/api/organizations/{lastActiveOrg}/usage - If the helper snapshot is missing or stale, Claude shows unavailable instead of falling back to stale values
Codex usage limits:
- Reads local Codex usage data from
%USERPROFILE%\.codex\sessions\**\*.jsonl - Session JSONL files are the only supported Codex source; there is no
logs_2.sqlitefallback - If no session JSONL file contains rate-limit payloads yet, Codex shows unavailable
- Displays the used percentage for Codex in both the widget and tooltip
- Converts local
remaining_percentpayloads to used percentage before display when needed - Classifies a
300minute window asX5hand a10080minute window asX7d, regardless of whether the payload places it inprimaryorsecondary - Uses the legacy
primary/secondarymapping only whenwindow_minutesis absent - Respects
CODEX_HOMEwhen it resolves to a Windows-readable path, including WSL-style/mnt/c/...paths
- If
CODEX_HOMEis not set, the plugin uses%USERPROFILE%\.codex - Set
CODEX_HOMEif your Codex state lives somewhere else - The plugin reads the
sessions\**\*.jsonltree under that directory - Windows path example:
C:\Users\<user>\.codex - WSL path example:
/mnt/c/Users/<user>/.codex - Linux-only paths such as
/home/<user>/.codexare not readable from Windows TrafficMonitor
- Dedicated browser profile:
%LOCALAPPDATA%\trafficmonitor-claude-usage-plugin\claude-browser-profile - Usage snapshot:
%LOCALAPPDATA%\trafficmonitor-claude-usage-plugin\claude-web-usage.json - Helper status:
%LOCALAPPDATA%\trafficmonitor-claude-usage-plugin\claude-web-helper-status.json - Watch lock:
%LOCALAPPDATA%\trafficmonitor-claude-usage-plugin\claude-web-helper-watch.lock
- Windows
- Node.js 22 or newer
- Microsoft Edge or Google Chrome installed locally
From the repository root:
powershell -ExecutionPolicy Bypass -File .\scripts\claude-web-helper.ps1 login- Opens a browser window with the helper's dedicated local profile
- Sign in to Claude there, then close that helper browser window
- In a deployed TrafficMonitor install, the bundled script path is
.\plugins\ClaudeUsagePlugin\claude-web-helper.ps1
powershell -ExecutionPolicy Bypass -File .\scripts\claude-web-helper.ps1 start- Launches the background refresh loop as a hidden background process
- This is the normal steady-state mode after the one-time login
- If a watcher is already running, it prints the current watcher PID instead of starting a duplicate
- A persisted watch lock is accepted only when its PID still belongs to a matching Node
index.mjs watchprocess with the same start time stopterminates only that validated watcher; a reused PID owned by another process is never terminated
powershell -ExecutionPolicy Bypass -File .\scripts\claude-web-helper.ps1 status- Shows the latest helper files, watch lock state, and helper process information
powershell -ExecutionPolicy Bypass -File .\scripts\claude-web-helper.ps1 stop- Stops the running helper watcher and cleans up a stale watch lock when possible
powershell -ExecutionPolicy Bypass -File .\scripts\claude-web-helper.ps1 watch- Repeats the cookie-based web fetch every 60 seconds in the foreground
- Useful only when you want console output for each refresh attempt
loginis the only interactive step- If
claude-web-helper.ps1plushelper\claude-web-helper\...are bundled underplugins\ClaudeUsagePlugin, the plugin can auto-start the helper watcher on plugin load - Close the helper browser window before
startorwatch, otherwise the Chromium cookies database may stay locked - The helper decrypts Chromium cookies under the same Windows user that completed the helper login
- The helper uses only Node built-ins under
helper\claude-web-helper; no Playwright install is required - If helper auth expires, the helper status file records the last failure and Claude becomes unavailable after the freshness window expires
- The Claude helper profile contains Claude browser cookies for the dedicated helper login
- The Claude helper snapshot and status files can contain usage data, organization identifiers or names, file paths, and error text
- Codex session JSONL files can contain sensitive session content; the plugin scans them locally for rate-limit payloads
- Do not share helper files, helper browser profiles, or Codex session JSONL files without reviewing and sanitizing them first
See ../PRIVACY.md for the full local-data disclosure.
- Claude helper fresh TTL: 90 seconds
- Claude plugin refresh: 30 seconds
- Claude helper watch refresh: 60 seconds
- Codex success refresh: 60 seconds
- Codex failure retry: 5 seconds