Feature request: configurable/disable-able background /usage polling (many concurrent sessions saturate the per-account usage endpoint limit)

Open 💬 0 comments Opened Jul 14, 2026 by RobertJLora

Describe the request

Running many concurrent interactive Claude Code sessions (10-15 terminal tabs, common when restoring a full tab layout after a reboot) makes every session independently poll GET https://api.anthropic.com/api/oauth/usage for the usage/rate-limit display. With that many pollers, the endpoint's per-account rate limit trips (HTTP 429, retry-after in the 500-700s range) and stays saturated for hours: no session, nor any external tool reading the same endpoint, can get a successful usage read, because the combined polling keeps re-tripping the limiter before the window clears.

The 429 only affects the usage readout (model requests and claude.ai are fine), but it makes /usage and any usage-based statusline permanently stale for heavy multi-session users.

Proposal

An env var or setting to lengthen or disable the background usage polling per session, e.g.:

  • CLAUDE_CODE_USAGE_POLL_INTERVAL_SECONDS (0 = disable background polling; /usage still fetches on demand), or
  • honoring Retry-After account-wide via a shared on-disk backoff marker so N sessions don't each retry into the same limit.

Either would let high-concurrency setups keep one designated usage surface without the sessions starving each other.

Environment

  • Claude Code CLI on macOS (Darwin 25.5.0)
  • Max plan, 10-15 concurrent interactive sessions
  • Reproduced: curl of /api/oauth/usage with the account's OAuth token returns 429 retry-after: 471 for ~3+ hours while sessions run. The account shows no rate limiting on claude.ai itself during this time, confirming it's specific to this metadata endpoint.

View original on GitHub ↗