Skip to content

codexbar cost: expose existing OpenCode Go local token/cost history #4606

Closed

Description

@h3x89

codexbar cost --provider opencodego returns: "cost is only supported for Antigravity, Claude, Codex, Cursor, Muse Code, Pi". The app already reads OpenCode Go local history from ~/.local/share/opencode/opencode.db (reader since #1021; token counts since #4000/0.67.0; v2 sessions in #4526), but OpenCode Go does not set supportsCostCommand, so the CLI cannot export it.

Request: enable OpenCode Go in codexbar cost (text and JSON), with the same daily/per-model token rows and unpriced handling as the app.
Use case: a self-hosted dashboard built on codexbar cost --format json.
Related: #4587 (pending v2 reader fixes).
Environment: CodexBar 0.75.0 (also checked main @6480977), macOS.

Activity

  1. added
    clawsweeper:intake:featurePreliminary submission classification; full source review pending.
    P3Low-risk cleanup, docs, polish, ergonomics, or speculative feature.
    clawsweeper:fix-shape-clearClawSweeper found a clear likely implementation shape for this issue.
    clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.
    clawsweeper:needs-product-decisionClawSweeper 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:source-reproClawSweeper found a high-confidence source-level issue reproduction.
    impact:otherThis issue has meaningful maintainer-visible impact outside the owned taxonomy.
    issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.
    and removed
    clawsweeper:intake:featurePreliminary submission classification; full source review pending.
    on Oct 17, 2026
  2. clawsweeper commented on Oct 17, 2026

    @clawsweeper

    Codex review: this still needs some work.

    Summary
    Keep this issue open: current main lacks the requested CLI export, and the linked reader work does not provide it.

    Reproducibility: Source proves the reported rejection through the CLI capability gate and the separate unsupported snapshot loader; no runtime command or tests were executed.

    Next step
    Confirm the CLI export scope and whether unpriced handling preserves existing reader behavior or adds token-only records.

    Review details

    Best possible solution:

    Reuse the shared local reader and snapshot projection for CLI export, preserving provider attribution, unknown values, and explicit cost provenance.

    Do we have a high-confidence way to reproduce the issue?

    Source proves the reported rejection through the CLI capability gate and the separate unsupported snapshot loader; no runtime command or tests were executed.

    Is this the best way to solve the issue?

    Reusing existing history models is appropriate, but toggling supportsCostCommand alone cannot work and text breakdown support also needs extension.

    AGENTS.md: found and applied where relevant.

    Remaining risk / open question:

    • The requested unpriced behavior needs definition: the existing reader excludes records without numeric costs, so retaining those records would expand its current contract.
    • CLI reporting calendars and periods must be reconciled with the reader's device-local buckets and bounded history.

    Codex review notes: model internal, reasoning medium; reviewed against 6480977b47f6.

    Label changes

    Label changes:

    • add P3: This is a bounded CLI export enhancement for an advanced dashboard workflow, with existing app history still available.
    • add impact:other: The missing machine-readable OpenCode Go history prevents the requested external dashboard integration.
    • add issue-rating: 🦞 diamond lobster: Current issue advisory state selects this label.
    • add clawsweeper:source-repro: Current issue advisory state selects this label.
    • add clawsweeper:no-new-fix-pr: Current issue advisory state selects this label.
    • add clawsweeper:fix-shape-clear: Current issue advisory state selects this label.
    • add clawsweeper:needs-maintainer-review: Current issue advisory state selects this label.
    • add clawsweeper:needs-product-decision: Current issue advisory state selects this label.

    Label justifications:

    • P3: This is a bounded CLI export enhancement for an advanced dashboard workflow, with existing app history still available.
    • impact:other: The missing machine-readable OpenCode Go history prevents the requested external dashboard integration.
    Evidence reviewed

    What I checked:

    How this review workflow works
    • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
    • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
    • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
    • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
    • Maintainers can also comment @clawsweeper review to request a fresh review only.
    • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge; those execution lanes are retired.
    • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

    Reviewed October 17, 2026, 1:42 PM ET / 17:42 UTC.

  3. added a commit that references this issue on Oct 19, 2026
    9766555
  4. steipete commented on Oct 19, 2026

    @steipete
    Owner

    Shipped in #4629 (9766555). Thanks @h3x89! codexbar cost --provider opencodego now shows the existing OpenCode Go local history in JSON and text, honoring All history and your cost time zone. It will be in the next release.

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

    P3Low-risk cleanup, docs, polish, ergonomics, or speculative feature.clawsweeper:fix-shape-clearClawSweeper found a clear likely implementation shape for this issue.clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.clawsweeper:needs-product-decisionClawSweeper 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:source-reproClawSweeper found a high-confidence source-level issue reproduction.impact:otherThis issue has meaningful maintainer-visible impact outside the owned taxonomy.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions