[Bug]: Usage → Limits shows warning banner 'No OpenCode Console workspace is signed in.' when using OpenCode v2 with third-party providers #41395
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#
- Enable the OpenCode provider in T3 Code with OpenCode v2 (e.g.
opencode v2.3.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. - (Optional) Have OpenCode enabled across multiple linked environments.
- 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#
- In
packages/provider-opencode/src/server/v2/usageLimits.ts(readServerUsageLimits), whenGET /api/experimental/usage/limitsreturns{ data: null }(no OpenCode Console workspace signed in), it attaches amessageto theunsupportedresult:if (body.data === null) return makeUnavailableUsageLimits({ checkedAt, reason: "unsupported", message: "No OpenCode Console workspace is signed in.", }); - In
checkUsageLimits(after #36519), whenreadOpenCodeGoUsageLimitsalso returnsreason: "unsupported"(without a message), it keeps the v2limitsobject (which has themessage):const legacy = yield* legacyUsageLimits; return limits !== void 0 && legacy.unavailable?.reason === "unsupported" ? limits : legacy; - In the Usage → Limits UI warning collector,
reason: "unsupported"entries are only suppressed whenmessageis omitted (orexternalUsageis set):
Becauseif (a?.unavailable?.reason === "unsupported" && (!a.unavailable.message || a.externalUsage)) continue;body.data === nullsets a non-emptymessage(unlikereadOpenCodeGoUsageLimitsand unlike the!go && budgets.length === 0branch right below it), the UI surfaces a benign third-party-provider OpenCode setup as a warning banner on every environment.
Related issues / PRs#
- Related to #36516 / #36519 (which added the fallback to
legacyUsageLimitswhile keeping the v2limitsobject when both areunsupported). - 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.
tanstack-source added labelsbug
nthewara(GitHub profile, opens in a new tab) linked this to #41415
juliusmarminge closed this
Sign in to join this conversation.