Skip to content

[Bug]: OpenCode Go layout changed, now Win-CodexBar reports "Parse error: Missing rolling usage window" #591

Description

@EricMegalovania

Existing issues

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

What happened?

Problem

OpenCode Go (Web source) currently fails with:

Parse error: Missing rolling usage window

Cookie auth itself succeeds (HTTP 200, no AuthRequired), but the scraper cannot find a rolling window in the returned page.

What changed upstream

  1. Page URL moved

    • Old: https://opencode.ai/wrk_XXX/go (also currently coded as https://opencode.ai/workspace/{id}/go)
    • New: https://opencode.ai/console/wrk_XXX/go
  2. Page layout changed

    The new /console/.../go page no longer exposes the old rollingUsage / rolling_usage / rolling + usagePercent / resetInSec shape the parser expects, so parse_usage_text() returns None for rolling and throws.

API key alternative now available

OpenCode Go now supports fetching limits via API key:

curl -H "Authorization: Bearer ${OPENCODE_API_KEY}" https://opencode.ai/zen/go/v1/usage | jq .

Response:

{
  "usage": {
    "rolling": {
      "status": "ok",
      "percent": 0,
      "resetsAt": "2026-09-22T06:56:21.515Z"
    },
    "weekly": {
      "status": "ok",
      "percent": 6,
      "resetsAt": "2026-09-28T00:00:00.000Z"
    },
    "monthly": {
      "status": "ok",
      "percent": 19,
      "resetsAt": "2026-09-30T08:26:37.000Z"
    }
  }
}

Suggestion

  • Update fetch_usage_page() URL to https://opencode.ai/console/{workspace_id}/go (with fallback to old paths).
  • Update extract_window() / parse_usage_text() for the new console layout.
  • Prefer GET /zen/go/v1/usage with OPENCODE_API_KEY when available, since it returns clean rolling / weekly / monthly { percent, resetsAt }.

Env

  • Win-CodexBar (Windows, Chrome, manual Cookie for opencode.ai)
  • Web source, reproducible on current main

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. Log in to opencode.ai and copy the session cookies.
  2. Import the cookies into Win-CodexBar. Win-CodexBar then reports:
    Parse error: Missing rolling usage window

Logs, screenshots, or recordings

<img width="950" height="1636" alt="Image" src="https://github.com/user-attachments/assets/3ffb47ae-135a-4f00-8910-cc017b382be2" />

App version

v0.60.3

Windows version

Windows 10 22H2 19045.7725

Additional context

No response

Activity

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

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions