Skip to content
Source
Sign inSign up
pingdotgg/t3code

[Bug]: Usage → Limits shows warning banner 'No OpenCode Console workspace is signed in.' when using OpenCode v2 with third-party providers #41395

Closednthewara(GitHub profile, opens in a new tab) opened this issue 0 comments

Before submitting

  • I searched existing issues and did not find a duplicate.
  • I included enough detail to reproduce or investigate the problem.

Area

apps/server

Steps to reproduce

  1. Enable the OpenCode provider in T3 Code with OpenCode v2 (e.g. opencode v2.3.2).
  2. Authenticate OpenCode only with a third-party provider (e.g. GitHub Copilot via opencode auth list), with no OpenCode Console workspace signed in and no OpenCode Go API key configured.
  3. (Optional) Have OpenCode enabled across multiple linked environments.
  4. Open Usage → Limits in T3 Code.

Expected behavior

OpenCode should be silently omitted from the Usage → Limits warning banner (matching the legacy readOpenCodeGoUsageLimits behavior when no OpenCode Go key is present, and matching the !go && budgets.length === 0 branch), since not signing into an OpenCode Console workspace is a normal setup for users who run OpenCode with third-party providers.

Actual behavior

An amber warning banner is permanently displayed on Usage → Limits with one line per connected environment where OpenCode is enabled:

<host-1> · OpenCode: No OpenCode Console workspace is signed in.
<host-2> · OpenCode: No OpenCode Console workspace is signed in.
<host-3> · OpenCode: No OpenCode Console workspace is signed in.

Root cause

  1. In packages/provider-opencode/src/server/v2/usageLimits.ts (readServerUsageLimits), when GET /api/experimental/usage/limits returns { data: null } (no OpenCode Console workspace signed in), it attaches a message to the unsupported result:
    if (body.data === null) return makeUnavailableUsageLimits({
      checkedAt,
      reason: "unsupported",
      message: "No OpenCode Console workspace is signed in.",
    });
  2. In checkUsageLimits (after #36519), when readOpenCodeGoUsageLimits also returns reason: "unsupported" (without a message), it keeps the v2 limits object (which has the message):
    const legacy = yield* legacyUsageLimits;
    return limits !== void 0 && legacy.unavailable?.reason === "unsupported" ? limits : legacy;
  3. In the Usage → Limits UI warning collector, reason: "unsupported" entries are only suppressed when message is omitted (or externalUsage is set):
    if (a?.unavailable?.reason === "unsupported" && (!a.unavailable.message || a.externalUsage)) continue;
    Because body.data === null sets a non-empty message (unlike readOpenCodeGoUsageLimits and unlike the !go && budgets.length === 0 branch right below it), the UI surfaces a benign third-party-provider OpenCode setup as a warning banner on every environment.
  • Related to #36516 / #36519 (which added the fallback to legacyUsageLimits while keeping the v2 limits object when both are unsupported).
  • Distinct from #40331 (which is about an expired/revoked Console login returning HTTP 503).

Impact

Cosmetic issue

Version or commit

0.1.12-nightly.20261123.5138

Environment

macOS 26.7.3 (arm64), T3 Code (Nightly) 0.1.12-nightly.20261123.5138, opencode v2.3.2 (authenticated with GitHub Copilot OAuth only)

Logs or stack traces

$ opencode auth list
GitHub Copilot  OAuth  stored

Workaround

None other than ignoring the banner, signing into an OpenCode Console workspace, or disabling the OpenCode provider.

  1. tanstack-source added labelsbug

  2. juliusmarminge closed this

Sign in to join this conversation.