Skip to content

[FEATURE]: /usage or /status command for Go plan limits in TUI #40584

Closed as not planned

Description

@bertrell

Problem

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
  • Wait for the public API from issue [FEATURE]: Public API for Go plan usage/limits #31084 — that issue is closed as completed but no public endpoint exists; the console is the only consumer

Use Case

  • 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.

Activity

  1. github-actions commented on Aug 5, 2026

    @github-actions
    Contributor

    This issue might be a duplicate of existing issues. Please check:

  2. bertrell commented on Aug 5, 2026

    @bertrell
    Author

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions