Skip to content

Bug Report: 5‑hour rolling quota incorrectly hits 100% while actual USD spend is far below limit #42549

Closed as duplicate

Description

@DoggyHU

Description

(Image

Image I’m experiencing abnormal quota‑counting behavior with the OpenCode‑Go subscription plan.

According to my usage chart, my total real‑world spending for the day was under 5 USD. My weekly quota sits at 45% and monthly quota at 22%, both well below their hard limits. However, the 5‑hour rolling quota hit 100% and blocked further API calls. The dashboard showed a full reset would take another 1 hour and 14 minutes.

Per official documentation, OpenCode‑Go applies these limits measured in USD value within sliding time windows:

  • 5‑hour rolling limit: 12 USD
  • Weekly limit: 30 USD
  • Monthly limit: 60 USD

There are two clear contradictions between documented rules and observed behaviour:

  1. Broken 5‑hour rolling‑window calculation
    Total daily spend was less than 5 USD, far under the 12 USD 5‑hour cap, yet the rolling‑usage counter maxed out at 100% and triggered rate‑limiting.
    The counter also did not behave as a sliding window: old usage was not gradually released as time passed. Instead the quota stayed fully locked until the full waiting period completed.
  2. Mismatched quota metrics across different time ranges
  • Weekly usage: 45% (not exhausted)
  • Monthly usage: 22% (not exhausted)
  • 5‑hour rolling usage: 100% (hard‑blocked)

Weekly and monthly percentage values align reasonably with real dollar spend. Only the 5‑hour rolling counter hits the ceiling prematurely.
This strongly suggests the 5‑hour rolling counter is tracking raw token / request throughput internally, not USD‑denominated consumption as stated in the documentation.

To Reproduce

  1. Activate an OpenCode‑Go subscription
  2. Run long‑running Agent / MCP workflows with heavy tool calls and large output token volume; mix multiple backend models (deepseek‑v4‑flash(go), deepseek‑v4‑pro(go), kimi‑k3(go) etc.)
  3. Keep actual total daily monetary consumption below 5 USD

Expected behavior

  1. The 5‑hour rolling quota should calculate real USD‑equivalent consumption within the sliding 5‑hour time window.
  2. Rate‑limiting should not trigger at 100% when spend remains well under the 12 USD threshold.
  3. The rolling window should operate in true sliding fashion: old usage decays over time and frees up quota incrementally, instead of locking completely until full reset.

Actual behavior

  • Total real‑world daily spend <5 USD, but 5‑hour rolling usage hits 100% and blocks API requests.
  • Weekly and monthly quota percentages remain normal and unexhausted.
  • The rolling‑usage progress bar stays locked; quota only becomes available again after waiting for the full remaining reset time, without gradual decay.

Additional context

This issue heavily breaks MCP / long‑agent use‑cases. Workflows with low real monetary cost get unexpectedly terminated by the 5‑hour rolling limiter, which conflicts with the advertised quota‑billing logic.

Plugins

No response

OpenCode version

No response

Steps to reproduce

No response

Screenshot and/or share link

No response

Operating System

No response

Terminal

No response

Activity

  1. github-actions commented on Aug 14, 2026

    @github-actions
    Contributor

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

  2. jethrosalvador commented on Aug 17, 2026

    @jethrosalvador

    same problem here

  3. pvehbo commented on Sep 29, 2026

    @pvehbo

    I encountered the same problem as well.

  4. adiatma85 commented on Oct 2, 2026

    @adiatma85

    So this is known issue all along

  5. Tarquinen commented on Oct 20, 2026

    @Tarquinen
    Member

    We're tracking this in #42985, so I'm closing this as a duplicate. Please follow that issue for updates.

    — from 𝕺𝖕𝖊𝖓𝕮𝖔𝖉𝖊

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