You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[FEATURE]: Public API for Go plan usage/limits #31084
I have checked that this feature hasn't been suggested before
Problem
OpenCode Go plan users can only check their usage limits (rolling 5h, weekly, monthly) via the interactive web console at https://opencode.ai. There's no programmatic way to monitor usage from the CLI.
Use case
CLI tools/dashboards that show Go usage alongside other metrics
Automated alerts when approaching limits
Local dashboard integration (like the opencode-sessions project)
Current alternatives
opencode stats shows session-level costs from the local DB, but can't match server-side sliding windows (especially the 5h rolling window which is tied to the server's timeUpdated, not "last 5 hours")
Browser automation to scrape the workspace page (brittle, requires session cookies)
Suggested API
A simple endpoint accessible with the existing Go API key:
The server already computes this via Subscription.analyzeRollingUsage / analyzeWeeklyUsage / analyzeMonthlyUsage — it's just not exposed outside the console SPA.
Would be a small but high-value addition. Thanks!
Reacted by MicoHider, Jesus Torres, TONG ZAO, Juan Torres, SQQzyS, jpribil, Felix Sanchez, vulturetone-dev, Chris does apps, Dima Golubenko and 1 more
Activity
github-actions commentedon Jun 6, 2026
This issue doesn't fully meet our contributing guidelines.
What needs to be fixed:
[FEATURE]:prefix in the title (e.g.,[FEATURE]: Public API for Go plan usage/limits)Please edit this issue to address the above within 2 hours, or it will be automatically closed.
This issue might be a duplicate of existing issues. Please check:
If you believe this was flagged incorrectly, please let a maintainer know.
[-]Feature request: Public API for Go plan usage/limits[/-][+][FEATURE]: Public API for Go plan usage/limits[/+]github-actions commentedon Jun 6, 2026
Thanks for updating the issue! It now meets our contributing guidelines. We appreciate the clear description and well-structured feature request.
TiceWise commentedon Jun 6, 2026
Duplicate of #16017 — adding my support there.
feat(tui): track OpenCode Go/Zen usage quota (5h/7d/1m dollars), v1.2.0
release: v1.2.1 (#13)
feat: scope statusline quota bar to subscription providers
feat(host): read OpenCode Go quota from the usage endpoint directly
feat: add best-effort OpenCode Go quota adapter