Skip to content

Agents panel: Separate OpenCode usage into its own collector instead of merging into Claude Code #7747

Open

Description

@neo-clon

Summary

The Claude usage collector (omarchy-agent-usage-claude) currently scans OpenCode SQLite history (~/.local/share/opencode/opencode.db) and merges Anthropic-provider messages into Claude Code's local stats and "TOKENS BY MODEL" breakdown.

This causes confusion and data pollution in the Claude Code tab:

  1. Model pollution: OpenCode internal, proxy, or experimental model identifiers (e.g. claude-sonnet-4-6, claude-opus-4-6, claude-sonnet-4-5) appear directly in the Claude Code "TOKENS BY MODEL" list.
  2. Subscription mismatch: OpenCode sessions often use independent API keys, OpenCode Zen/Go credits, or third-party gateways rather than the Claude Code OAuth subscription. Merging them misrepresents the actual Claude Code usage and limits.

Expected Behavior

  • Claude Code collector (omarchy-agent-usage-claude) should only reflect Claude Code CLI native usage (~/.claude/projects/).
  • OpenCode usage should be tracked in its own dedicated collector / tab in the Agents panel (similar to the ongoing work in PR Add OpenCode Go collector for the Agents panel #7687 for OpenCode Go) so each tool's usage, models, and quotas remain accurate and isolated.

Steps to Reproduce

  1. Use OpenCode with Anthropic provider models (recorded in ~/.local/share/opencode/opencode.db).
  2. Use Claude Code separately.
  3. Run omarchy-agent-usage-update (or let the agents widget refresh).
  4. Open the Agents bar panel on the Claude Code tab.
  5. Observe that "TOKENS BY MODEL" lists the model IDs and token counts aggregated from OpenCode.

System details

  • Omarchy version: 4.0.0-1
  • Kernel: Linux 7.1.8-arch1-3
  • Hyprland: 0.56.2
  • Component: shell/plugins/agents (omarchy.agents) / bin/omarchy-agent-usage-claude

Activity

  1. rookepoole commented on Sep 1, 2026

    @rookepoole

    Two additional open PRs implement the separate OpenCode Go provider requested here: #8065 and #8823. Both add an independent collector with local usage and rolling, weekly, and monthly limits; #8823 also adds dedicated panel assets and default-provider registration. Qualified link: these cover the separate-provider half of the report, but neither PR removes any legacy OpenCode scanning from another collector.

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

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions