-
Notifications
You must be signed in to change notification settings - Fork 1.9k
OpenCode Go: auto mode presents local estimates as authoritative when the cookie cache is empty #2982
Copy link
Copy link
Closed
Labels
P2Normal priority bug or improvement with limited blast radius.Normal priority bug or improvement with limited blast radius.clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.ClawSweeper marked this issue as needing maintainer review before automation.clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.ClawSweeper marked this issue as needing a product or behavior decision.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.ClawSweeper found a high-confidence source-level issue reproduction.impact:auth-providerThis issue is about auth, provider routing, model choice, or SecretRef resolution.This issue is about auth, provider routing, model choice, or SecretRef resolution.impact:ux-frictionUser-facing flow adds avoidable confusion or support burden without fully blocking progress.User-facing flow adds avoidable confusion or support burden without fully blocking progress.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.Very strong issue quality with high-confidence source-level or clear reproduction.
Description
Activity
Metadata
Metadata
Assignees
Labels
P2Normal priority bug or improvement with limited blast radius.Normal priority bug or improvement with limited blast radius.clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.ClawSweeper marked this issue as needing maintainer review before automation.clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.ClawSweeper marked this issue as needing a product or behavior decision.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.ClawSweeper found a high-confidence source-level issue reproduction.impact:auth-providerThis issue is about auth, provider routing, model choice, or SecretRef resolution.This issue is about auth, provider routing, model choice, or SecretRef resolution.impact:ux-frictionUser-facing flow adds avoidable confusion or support burden without fully blocking progress.User-facing flow adds avoidable confusion or support burden without fully blocking progress.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.Very strong issue quality with high-confidence source-level or clear reproduction.
Summary
In auto mode, OpenCode Go can show local estimates as if they were server values. The web overlay from #2430 only runs when a cookie is already cached. With an empty cache it is skipped without an error, the local strategy wins, and the menu bar shows quota percentages that are wrong by up to 55 points with no sign that they are local.
Not a duplicate of #2543 or #2551. Those covered the case where a cookie exists. This is the case where the overlay has no cookie to use.
Environment
CodexBar 0.49.6 (120), macOS 27.0, arm64. Provider
opencodego,cookieSourceauto, noworkspaceID, local rows present in~/.local/share/opencode/opencode.db.Observed
Read 9 seconds apart, both normalized to percent used.
Reproduction
opencode.db.Cause
The state cannot heal itself. The overlay needs a cached cookie, and the only strategy that fills that cache never runs.
OpenCodeGoLocalUsageFetchStrategy.snapshotinOpenCodeGoProviderDescriptor.swift:resolveStrategiesreturns[local, web], andProviderFetchPipelinemoves to the next strategy only on a thrown error. A successful local read ends the pipeline, so the web strategy that imports the cookie is never reached.Expected
Either let the overlay import a cookie when the cache is empty, or mark local-only results in the UI the way the CLI marks them with
"source":"local". An estimate should not render as an authoritative quota.Workaround
Set
workspaceIDin~/.codexbar/config.json. Auto then puts the web strategy first and matches the dashboard. This appears only in a comment on closed issue #2543.#2879 would remove the cookie dependency here entirely.
No cookie values, tokens, or account identifiers are included in this report.