GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — [FEATURE]: report plan usage (Go limits, Zen balance) to ACP clients · Issue #49693 · anomalyco/opencode

[FEATURE]: report plan usage (Go limits, Zen balance) to ACP clients #49693

New issue
Copy link
New issue
Copy link
Open
Open
[FEATURE]: report plan usage (Go limits, Zen balance) to ACP clients#49693
Copy link

Description

@iamenahs
iamenahs
opened on Sep 18, 2026
Issue body actions

Feature hasn't been suggested before.

  • I have verified this feature I'm about to request hasn't been suggested before.

Describe the enhancement you want to request

opencode acp already sends usage_update with the context size and the session's cost. What an ACP client still can't see is the account's plan standing:

  • Go: the rolling 5-hour, weekly and monthly usage that GET /zen/go/v1/usage returns ([FEATURE]: Add Go plan usage/balance API endpoint (rolling/weekly/monthly windows) #16017).
  • Zen: the remaining balance (Feature Request: Add Zen balance API endpoint #10448).

Today an ACP client (Zed, HarnessDesk, others) has to find the user's key and call those endpoints itself, which it may not be able to do.

Suggestion: have the ACP server attach these figures itself. ACP has no standard plan-usage message yet, so _meta or an extension method is the sanctioned place. Either of these would work:

  • a _meta block on usage_update:
{ "sessionUpdate": "usage_update", "used": 53000, "size": 200000,
  "_meta": { "opencode": { "go": { "rolling": { "percent": 19.5, "resetsAt": "…" }, "weekly": { … }, "monthly": { … } } } } }
  • a custom request such as _opencode/usage, returning the same object.

In the meantime, HarnessDesk reads each session's cost from opencode.db (HarnessDesk/HarnessDesk#772), but that shows spend, not the plan's limits.

Activity

  1. opencodejr commented on Oct 28, 2026

    @opencodejr
    opencodejrBot
    on Oct 28, 2026
    Contributor
    More actions

    Thanks for the detailed request, @iamenahs!

    To restate it: opencode acp should report the account's plan standing (Go's 5-hour, weekly and monthly usage, and the Zen balance) to ACP clients. That could be a _meta.opencode block on usage_update or an extension method such as _opencode/usage, so clients like Zed or HarnessDesk don't need the user's key to call the Console endpoints themselves.

    Some context: OpenCode v2 already fetches these limits (it's what the TUI's usage display shows, and the server exposes it as the usage.limits endpoint), but the ACP server currently sends only used, size and cost on usage_update. A plugin can't add this, because plugins have no hook into ACP session updates or extension methods.

    Related issues you mentioned:

    • [FEATURE]: Add Go plan usage/balance API endpoint (rolling/weekly/monthly windows) #16017: the Go usage endpoint
    • Feature Request: Add Zen balance API endpoint #10448: the Zen balance

    The maintainers will consider this request.

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

Metadata

Metadata

Assignees

No one assigned

    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

      You are visitor 01402775 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.