Skip to content

Remote Claude: reuse a reading for five minutes instead of asking every tick - #522

Merged
vinzdg merged 1 commit into
vinzdg:mainfrom
solidfox:fix/remote-claude-usage-pacing
Nov 5, 2026
Merged

vinzdg merged 1 commit into
vinzdg:mainfrom
solidfox:fix/remote-claude-usage-pacing

Conversation

@solidfox

@solidfox solidfox commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

The remote Claude ring asked /api/oauth/usage on every store tick (about every 45 s). That endpoint's limit is per login, and a server's login is shared by every Claude Code session running there (Claude Code reads the same endpoint), so on a busy server about every other request came back 429. The back-off never grew past a minute, because each success in between reset it.

This holds the last good snapshot for five minutes, the same allowance ClaudeOAuthProvider already keeps for local logins, and asks early only when one of the held windows has rolled over.

  • ClaudeRemoteProvider: lastSnapshot + minEndpointInterval (default 5 min, injectable).
  • Test: a second tick inside the allowance doesn't reach the endpoint.

Tests: make test, 2602 passed, 17 skipped.

🤖 Generated with Claude Code

…ry tick

The remote ring asked /api/oauth/usage on every store tick. That limit is per
login, and a server login is shared by every Claude Code session running there
(22 on eve), so about every other ask came back 429. The back-off never grew
past a minute either, because each success in between reset it.

Hold the last good snapshot for five minutes, the allowance the local provider
already keeps, and ask early only when one of its windows has rolled over.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@solidfox
solidfox requested a review from vinzdg as a code owner November 4, 2026 10:44
@vinzdg
vinzdg merged commit a03b7ba into vinzdg:main Nov 5, 2026
vinzdg added a commit that referenced this pull request Nov 6, 2026
…panese

- Claude Code sessions named by their title (#510); the lone Claude ring
  named when Claude Desktop uses another account (#511).
- Cost indexer stats transcripts (#501) and acts only on changed readings
  (#514).
- Krea AI (#490), a Xiaomi MiMo preset (#503), Grok multi-account (#515),
  Japanese up to date (#492), deficit rings by soonest expiry (#496).
- Fixes: Claude weekly-only /usage (#527), remote Claude reuse (#522),
  remote Codex behind a proxy (#523), Kiro V2 engine and parsing (#528,
  #517), Kimi monthly quotas (#526), MiniMax China sk-api keys (#529),
  Grok Bot resets (#518), Developer ID team check (#491).
- Windows: the taskbar strip drawn as the notch (#506), Claude accounts as
  rows (#502), Antigravity through agy.exe (#507), a hook auth token (#525).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants