Skip to content

[Bug]: OPENCODE is added but can't retrieve info. #211

Closed

Description

@AquilesDelgadoR

Existing issues

  • I searched existing issues and did not find a duplicate.

What happened?

Image Image

I try manal way copying the cookies from thr developertoll network header, and also the automatic impornting from firefox because I saw google and edge have more limitations. But always have same result.

Parse error: Missing usage percent (rolling or weekly).

Sorry to reported a similar issue again, thanks to try with the previous one.

Affected area

  • Tray panel
  • Settings UI
  • Config file / settings persistence
  • CLI
  • Provider-specific behavior
  • Installer / release packaging
  • Startup / background behavior
  • Other

Steps to reproduce

  1. providers
  2. opencode
  3. add cookies manual or import from navigator(opening the go subscrition before)
  4. refresh and shows Parse error: Missing usage percent (rolling or weekly)

Logs, screenshots, or recordings


App version

v0.43.0

Windows version

No response

Additional context

No response

Activity

  1. added
    bug
    on Jul 20, 2026
  2. Finesssee commented on Jul 20, 2026

    @Finesssee
    Collaborator

    Thanks for the report, I will try to fix it ASAP

  3. Finesssee commented on Jul 21, 2026

    @Finesssee
    Collaborator

    Status

    Part code fix, part cookie/setup on your side.

    Code: #193 already allowed rolling-only / weekly-only; your error meant the live OpenCode body still did not match our keys. #213 widens nested roots and field aliases (data / subscription / billing, fiveHourUsage, weekUsage, usedPercent, pct, etc.).

    Not in winget 0.43.0 yet — same as #210: wait for the next packaged release, or build from latest main.

    What to try on your machine (even on 0.43.0)

    1. In the browser, open https://opencode.ai and sign in (same browser you import from).
    2. Open the workspace billing / subscription page once so the server has a warm session.
    3. In CodexBar → OpenCode provider:
      • Cookie source: Auto or Browser (or Manual with a fresh Cookie header from DevTools on an opencode.ai request — not a random site).
      • Do not leave cookie source Off if you rely on browser cookies.
    4. Prefer Firefox import if Chrome/Edge lock the cookie DB (as you noted).
    5. Refresh the provider. If it still fails, quit CodexBar fully and reopen after importing cookies.

    After the next release / main build

    If parse still fails with cookies that work in the browser:

    codexbar-cli diagnose -p opencode
    

    Paste a redacted snippet (strip Cookie / session values). That tells us if OpenCode changed the payload again.

    Summary

    Build Expectation
    0.43.0 winget May still fail; fix is on main only for now
    Next release or main build Should parse more body shapes; still needs valid OpenCode cookies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions