anomalyco / anomalyco/opencode

[FEATURE] Add unified usage tracking via /usage (#9545)

Open
#9,281 11 comments 33 reactions 1 assignee View on GitHub

@thdxr is already working on this.

Since Jan 18, 2026.

Dominant language
TypeScript
Stars
209k
Forks
27.5k
Avg merge
7h 2m
Merged PRs (30d)
384

Description

  • I have verified this feature I'm about to request hasn't been suggested before.
Describe the enhancement you want to request

When you sign in to opencode with an OAuth provider, there's no built-in way to see how much of your plan or rate limit you've used. You have to open each provider's dashboard. I'd like usage to be visible inside opencode for the providers it already authenticates.

The feature now covers:

  • Usage for four OAuth providers: Anthropic Claude, GitHub Copilot, OpenAI ChatGPT, and Google Antigravity.
  • A GET /usage endpoint that returns a normalized snapshot per provider (rate-limit windows, reset times, credits or quota, and plan type), each with a status such as ok, stale, or unauthenticated.
  • A /usage TUI dialog and a sidebar Usage section, with config for provider scope and whether to show used or remaining. End-of-turn refresh is throttled and only warns at 80/90/95%.
  • Copilot usage reads quota with the same GitHub device token the normal Copilot login already stores, so it needs no extra setup.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.