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]: /usage or /status command for Go plan limits in TUI #40584
OpenCode Go plan users can check their rolling 5h / weekly / monthly usage limits only through the web console at https://opencode.ai/workspace (cookie-based browser auth). There is no way to check usage from the TUI or CLI — the only programmatic endpoint issue #31084 proposed (GET /zen/go/v1/usage) does not exist (returns 404).
This means Go users are flying blind while paying. If you hit a limit mid-session, you have no way to know which cap (5h rolling, weekly, monthly) is exhausted or when it resets — you just get a silent request block and have to switch providers or wait.
The data already exists server-side (the console renders it), but it is not exposed through the CLI/TUI.
Proposed Solution
Add a slash command (e.g. /usage or /status) that displays:
OpenCode Go Usage
5h rolling: $2.34 / $12.00 (19%) resets in 2h
weekly: $8.91 / $30.00 (30%) resets in 3d
monthly: $15.00 / $60.00 (25%) resets in 18d
This could hit the same internal endpoint the console SPA uses, authenticated with the existing Go API key (already available via ~/.local/share/opencode/auth.json).
Alternatives Considered
Browser automation to scrape the console page — brittle, requires session cookies
opencode stats — only shows local session token counts, not server-side rolling windows
CLI users running heavy agent sessions can monitor remaining budget without leaving the terminal
Proactive alerts when approaching a cap (e.g. "5h cap at 90% — consider switching to a cheaper model")
Avoids the silent-failure-then-switch-to-free-tier pattern that happens when you don't know you're hitting a wall
Context
This MacBook Pro runs opencode serve as a persistent backend for multiple clients (browser, phone, SSH). All clients share the same Go API key. Heavy parallel use burns the 5h cap fast, and there's no way to see it coming.
Go is a paid product ($10/mo) — showing usage is table stakes for any metered service.
[FEATURE]: Display token usage information in the TUI #13003: Requests a /usage slash command to display token usage information in the TUI — overlaps in the proposed command name and TUI display approach, though focused on local token counts rather than server-side Go plan caps.
Closing as duplicate of #16017. That issue covers the same request (Go plan usage API endpoint for rolling/weekly/monthly windows) and has a submitted PR (#16513). Please add your +1 there.
Activity
github-actions commentedon Aug 5, 2026
This issue might be a duplicate of existing issues. Please check:
/usagecommand would build on top of that same endpoint./usageslash command to display token usage information in the TUI — overlaps in the proposed command name and TUI display approach, though focused on local token counts rather than server-side Go plan caps.bertrell commentedon Aug 5, 2026
Closing as duplicate of #16017. That issue covers the same request (Go plan usage API endpoint for rolling/weekly/monthly windows) and has a submitted PR (#16513). Please add your +1 there.