OpenCode provider reaches cookie-authenticated session, but fetch fails with HTTP 500
Environment:
- CodexBar 0.20
- macOS 15.x
- OpenCode provider
- Cookie source: Manual
What I verified:
- I am logged into opencode.ai in the browser
- I can see authenticated POST requests to https://opencode.ai/_server in DevTools
- Request headers include a valid Cookie header
- CodexBar no longer fails with “No OpenCode session cookies found in browsers”
- After supplying the cookie manually, CodexBar fails with: “OpenCode API error: HTTP 500: HTTPError”
What I tried:
- Manual cookie from authenticated /_server request
- Workspace override set to: wrk_01KNJZ12TYPERCDX6W75FZF8ZZ
Expected:
- CodexBar should fetch workspace/subscription usage from OpenCode
Actual:
- CodexBar returns HTTP 500 from the OpenCode provider
how can we help for this ?
I have this issue too. If I enable debugging, then in the log file it says this
have the same issue
[2026-05-05T22:40:59.093Z] [DEBUG] com.steipete.codexbar.cookie-cache: Cookie cache hit provider=opencode
[2026-05-05T22:40:59.498Z] [ERROR] com.steipete.codexbar.opencode-usage: OpenCode subscription payload missing after GET; retrying with POST.
[2026-05-05T22:40:59.636Z] [ERROR] com.steipete.codexbar.opencode-usage: OpenCode returned 500 (type=application/json;charset=UTF-8 length=53)
[2026-05-05T22:40:59.658Z] [DEBUG] com.steipete.codexbar.cookie-cache: Cookie cache hit provider=opencode
Turned out I was using OpenCode but I don't have credits and htere's a separate provider for OpenCode Go that works for me. After disabling OpenCode and switching to OpenCode Go in codexbar it worked for me. I had Codex clone the repo and replace my app with a locally built one instead of the release binary and it was surprisingly easy even without xcode, then it could help debug and make a better error message than HTTP 500
i have zen enabled with credit and still not working, still both opencode and go doesnt work.
Closing this as upstream/server-side for now. Current main already handles the client-side part: OpenCode auth/account-context failures are treated as invalid credentials and HTTP/server responses surface clearer errors instead of a misleading generic 500. I re-ran OpenCodeUsageFetcherErrorTests locally; all 7 tests pass. The remaining reported behavior is the opencode.ai _server endpoint returning HTTP 500 for an authenticated session, which CodexBar cannot fix client-side. Also note OpenCode Go credits are separate and should use the OpenCode Go provider.