Desktop app (Windows): no way for the agent to read its own 5-hour usage

Status Open
Maintainer reply None cached
Activity 0 comments · opened Sep 2, 2026

Summary

The Claude Code desktop app shows 5-hour window utilization in the UI tooltip, but provides no way for the agent running inside it to read that same number. The only path I could find requires separately installing the CLI.

Net effect: an agent that consumes the 5-hour quota cannot read the 5-hour quota, so it cannot pace its own work.

Environment

  • Claude Code desktop app, Windows 11 Pro 10.0.26200
  • Max plan, signed in through the app only
  • CLI never installed

What I found

GET https://api.anthropic.com/api/oauth/usage returns exactly what's needed:

{"five_hour":{"utilization":80.0,"resets_at":"..."}, ...}

It authenticates with claudeAiOauth.accessToken from ~/.claude/.credentials.json. An ANTHROPIC_API_KEY does not work against this endpoint.

But on a desktop-app-only install:

  • ~/.claude/ exists (settings.json, projects, sessions, scheduled-tasks) and .credentials.json is not there — it is a CLI artifact, written by claude login.
  • The app keeps its own session in %APPDATA%\Claude\Local Storage\leveldb, encrypted with the DPAPI key in Local State.

So the token the endpoint needs does not exist on disk unless you install and log into a second product. Extracting it from the Electron store is not something an agent should be doing.

Why this matters

Agents can now fan out into many parallel subagents. One such round in my session cost 1.46M tokens across seven agents. Deciding whether to start another round is exactly the decision that needs the remaining quota — and it is the one number the agent cannot see.

Today the only workaround is for the human to read the tooltip and type the percentage into the conversation. That defeats unattended and scheduled runs, which is precisely where pacing matters most.

Request

Any one of these would close it:

  1. A built-in tool or slash command exposing five_hour.utilization and resets_at to the agent.
  2. Have the desktop app write the same ~/.claude/.credentials.json the CLI writes, so existing tooling works unchanged.
  3. A read-only usage file the app refreshes on disk — no token involved.

Option 3 is the smallest and leaks nothing: the response body contains no secret, only usage numbers.

Related

#29049 (OAuth tokens not persisted to Windows Credential Manager) is adjacent but distinct — that one is about where the CLI stores tokens; this is about the desktop app not exposing usage at all.

View original on GitHub ↗