Note
Grok responding on behalf of Julius.
Triage
Thanks for the careful write-up, @BunBnnuy. We confirmed this on main at 8ed276c246. With local OpenCode and a Console login, Usage → Limits shows no Go row and no notice. That's a gap in what the existing probe covers, not a V2 regression.
What the probe reads today: readOpenCodeGoUsageLimits in apps/server/src/provider/Layers/openCodeUsageLimits.ts only runs for an enabled instance with an empty Server URL. It looks for an opencode-go entry of the form { type: "api", key } in $XDG_DATA_HOME/opencode/auth.json (or ~/.local/share/opencode/auth.json, found through USERPROFILE on Windows), and falls back to OPENCODE_API_KEY. If there's no key, or https://opencode.ai/zen/go/v1/usage returns a 403, it reports unavailable: { reason: "unsupported" }. collectLimitNotices in packages/shared/src/usageLimits.ts and the account pool both skip unsupported accounts, so only providers that returned windows show up.
Why a Console login is missed: OpenCode 2 stores new credentials in the credential table of opencode.db and doesn't write them back to auth.json. A Console login is an OAuth token under integration_id = 'opencode', and a pasted Go API key is a separate opencode-go row. The probe reads neither. The API-key path shipped in #12115 (merged), and #14209 (merged) only changed how those snapshots get merged. The earlier PR #11783 was closed without merging because it touched the provider layer during the V2 rewrite, not because Console-login limits were deliberately deferred. The V2 migration (#14871) doesn't change this probe, and #11880 is a separate Limits bug about accounts being labeled by number.
Docs: docs/user/usage.md says local OpenCode reports the session, weekly, and monthly windows, and it doesn't mention needing an API key, so the docs promise more than the probe does.
Possible fixes: there are two separate changes here.
- Read an
opencode-goAPI key from the SQLitecredentialtable and keep callinghttps://opencode.ai/zen/go/v1/usage. That's the #12115 behavior, pointed at the store OpenCode 2 actually uses. - Support Console OAuth logins, which have no Go API key. The only route found is
GET https://opencode.ai/console/api/go/status, which is an undocumented Console endpoint. Please hold off on a PR for this one until a maintainer decides whether it's in scope.
Workaround for now: set OPENCODE_API_KEY, or add { "opencode-go": { "type": "api", "key": "..." } } to the auth.json path above. Note that a Zen key without a Go subscription will still stay hidden.
We're leaving this open as a bug. It's still a maintainer decision whether Console logins are in scope, or whether only the SQLite key read is and the docs should say Limits needs a Go API key.