Skip to content

Releases

v0.19.2

Choose a tag to compare

@github-actions github-actions released this 04 Nov 13:55

Fixed

  • OpenAI quota stayed unavailable on OpenCode V2 even after signing in again.
    V2 keeps credentials in its own database and no longer updates auth.json,
    so the reader kept using a stale token. The server plugin now asks OpenCode
    for the active OpenAI credential (ctx.integration.connection), and the
    sidebar reads it from client.credential.list(). auth.json remains the
    fallback. Credentials owned by OpenCode are never refreshed or rewritten by
    this plugin, so OpenCode's own refresh token is not invalidated.

Full Changelog: v0.19.0...v0.19.2

v0.19.0

Choose a tag to compare

@github-actions github-actions released this 02 Nov 12:41

Added

  • OpenCode 2.x support. The default export is now a plugin definition with
    id and setup(ctx); the quota gate runs on the context, compaction and
    generate session hooks, and idle refresh uses session.idle events.
  • opencode-hard-limit/tui export: the sidebar as a 2.x TUI plugin
    (sidebar.content slot), loaded from the same plugins entry as the server
    part. Nothing is copied into the config dir on 2.x.
  • The 1.x entry point stays available through server() on the same default
    export, so one package works on both major versions.

Changed

  • The programmatic 1.x factory is now QuotaHardStopPlugin.server({ directory, client }).
    The named QuotaHardStopPlugin export is gone; the default export is an object.
  • OpenCode 1.x needs 1.18.29 or newer, the first version that accepts an object
    as a plugin's default export.
  • opencode-hard-limit install detects the OpenCode major version
    (opencode --version). On 2.x it adds the package to the plugins key of
    opencode.json, drops our old plugin entry, and removes the sidebar copy
    and its tui.json/cli.json entries left by 1.x installs. On 1.x, or when the
    version cannot be detected, it keeps the previous behavior.
  • opencode-hard-limit uninstall clears both the plugin and plugins keys
    and the sidebar entries in tui.json and cli.json.

Full Changelog: v0.18.1...v0.19.0

v0.18.1: Multi-account documentation

Choose a tag to compare

@felipesotero felipesotero released this 21 Oct 18:37

Documentation

  • README: guide for single vs. multi-account usage, a settings table, and a
    "what's new in 0.18.0" section. No code changes.

Full Changelog: v0.18.0...v0.18.1

v0.18.0: Multi-account quota, 429 handling and warm

Choose a tag to compare

@felipesotero felipesotero released this 21 Oct 18:37

With a single account nothing changes: no new setup, same threshold.

Added

  • Multi-account quota: named Claude profiles and OpenAI/Codex account stores are
    read per account, the gate checks the account that serves each request, and
    the sidebar shows one row per account.
  • warm and warm --watch commands that keep idle Claude profiles logged in
    by refreshing their OAuth tokens. Opt-in: they never run unless called.
    warm refreshes only expired profiles, with per-account backoff, and runs
    its child process with isolated args, a clean environment and group kill.

Changed

  • A server-sent Retry-After on a 429 is capped (maxRateLimitBackoffMs,
    10 min; noBaselineRateLimitBackoffMs, 1 min when there is no earlier
    reading), and good data keeps being served through the blip.
  • A transient error (timeout, 5xx, malformed response) no longer blocks on its
    own. The gate keeps using the last good reading and blocks only when that
    reading is below the threshold, or is too old and close to it
    (staleBlockMarginPct).
  • A named Claude profile whose OAuth token has expired is allowed through with
    a warning, so the call itself can renew the token.
  • ~/.claude is no longer treated as an extra account beside named profiles.
  • Quota account resolution is unified between the gate and the library.

Full Changelog: v0.17.0...v0.18.0

v0.17.0: Star prompt, Anthropic multi-account credentials and packaging fix

Choose a tag to compare

@felipesotero felipesotero released this 21 Oct 18:37

Added

  • init and install ask once, on an interactive terminal, whether to star the
    repo on GitHub. Starring needs an explicit yes and goes through your own
    authenticated gh; the plugin handles no GitHub token. Skip it with
    --no-star, OPENCODE_QUOTA_NO_STAR=1 or CI.
  • Tiered Anthropic credential resolution for opencode-anthropic-multi-account:
    reads its accounts.json first, falls back to OpenCode's auth.json, and
    keeps the legacy claude CLI/keychain path for single-account users. Cache
    entries are stamped with an account key, so switching accounts forces a fresh
    read. New config: anthropicAccountsFile, anthropicCredentialSource.

Fixed

  • The published CLI crashed with ERR_MODULE_NOT_FOUND because lib/star.js
    was missing from the files allowlist of the tarball.
  • The star prompt no longer appears on set, only on init and install.

Tests

  • test/package-files.test.js checks that every relative import reachable from
    bin/cli.js and quota-hard-stop.js is listed in files.

What's Changed

  • Ask once, on install, whether to star the repo on GitHub by @roalhadeff in #2

New Contributors

Full Changelog: v0.15.0...v0.17.0

v0.15.0: Global CLI install on startup

Choose a tag to compare

@felipesotero felipesotero released this 21 Oct 18:37

Added

  • When the server plugin starts, it installs the matching published package
    globally in the background, so opencode-hard-limit is available in OpenCode
    shell mode (for example opencode-hard-limit postpone 30).

Full Changelog: v0.14.3...v0.15.0

v0.14.3 — Fail-postpone mode

Choose a tag to compare

@felipesotero felipesotero released this 24 Jul 17:43

Fail-postpone mode (new, opt-in)

A third quota-block failure mode alongside fail-closed/fail-open: manually
and temporarily bypass an otherwise-legitimate block when you've decided to
accept the risk of running over quota for a while.

  • New allowPostpone config flag (--allow-postpone, OPENCODE_QUOTA_ALLOW_POSTPONE), disabled by default.
  • New CLI: opencode-hard-limit postpone [minutes] (default 30, clamped 1-240) and opencode-hard-limit postpone --clear.
  • Runs entirely via OpenCode's native shell-escape (!command) — no LLM call, no token cost.
  • When enabled, a block's error message and the sidebar widget both surface a hint on how to postpone.
  • opencode-hard-limit get shows whether a postpone is currently active and how much time is left.

Fixes

  • Sidebar widget crashed entirely on OpenCode restart because the deploy step
    didn't ship lib/postpone.js alongside the sidebar plugin — fixed.
  • Simplified the quota-block error message; removed AI-directed instruction
    text that had no effect (a blocked subagent's chat.params throw happens
    before any model text is generated, so OpenCode's task tool has nothing
    to relay to the parent — documented as a known upstream limitation in the
    README instead of working around it with unreliable message text).
  • Clarified that OpenCode's shell mode only triggers when ! is the first
    character typed into an empty prompt — pasting the whole
    !opencode-hard-limit postpone 30 line at once does not switch modes.
    The block message, sidebar hint, and README now instruct: type ! first,
    then paste just opencode-hard-limit postpone 30 (without the !).

Docs

  • New README "Fail-postpone mode" section: how to enable, the shell-escape
    mechanism, the type-then-paste caveat, and the subagent limitation.

Full diff: v0.12.2...v0.14.3