Repository navigation
codexbar cost: expose existing OpenCode Go local token/cost history #4606
Copy link
Copy link
Closed
Labels
P3Low-risk cleanup, docs, polish, ergonomics, or speculative feature.Low-risk cleanup, docs, polish, ergonomics, or speculative feature.clawsweeper:fix-shape-clearClawSweeper found a clear likely implementation shape for this issue.ClawSweeper found a clear likely implementation shape for this issue.clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.ClawSweeper marked this issue as needing maintainer review before automation.clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.ClawSweeper 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 does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.ClawSweeper found a high-confidence source-level issue reproduction.impact:otherThis issue has meaningful maintainer-visible impact outside the owned taxonomy.This 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.Very strong issue quality with high-confidence source-level or clear reproduction.
Description
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.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
P3Low-risk cleanup, docs, polish, ergonomics, or speculative feature.Low-risk cleanup, docs, polish, ergonomics, or speculative feature.clawsweeper:fix-shape-clearClawSweeper found a clear likely implementation shape for this issue.ClawSweeper found a clear likely implementation shape for this issue.clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.ClawSweeper marked this issue as needing maintainer review before automation.clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.ClawSweeper 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 does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.ClawSweeper found a high-confidence source-level issue reproduction.impact:otherThis issue has meaningful maintainer-visible impact outside the owned taxonomy.This 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.Very strong issue quality with high-confidence source-level or clear reproduction.
Activity
clawsweeper commentedon Oct 17, 2026
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:
Codex review notes: model internal, reasoning medium; reviewed against 6480977b47f6.
Label changes
Label changes:
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.issue-rating: 🦞 diamond lobster: Current issue advisory state selects this label.clawsweeper:source-repro: Current issue advisory state selects this label.clawsweeper:no-new-fix-pr: Current issue advisory state selects this label.clawsweeper:fix-shape-clear: Current issue advisory state selects this label.clawsweeper:needs-maintainer-review: Current issue advisory state selects this label.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:
Sources/CodexBarCore/Providers/OpenCodeGo/OpenCodeGoProviderDescriptor.swift:129, 6480977b47f6)Sources/CodexBarCore/CostUsageFetcher.swift:489, 6480977b47f6)Sources/CodexBar/UsageStore+TokenCost.swift:723, 6480977b47f6)docs/cli.md:77, 6480977b47f6)Sources/CodexBarCore/Providers/OpenCodeGo/OpenCodeGoLocalUsageReader.swift:379, 0c760f9ba25a)How this review workflow works
@clawsweeper re-reviewcomments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.@clawsweeper re-reviewor@clawsweeper re-runon an open PR or issue to request a fresh review only.@clawsweeper reviewto request a fresh review only.@clawsweeper explainto ask for more context, or@clawsweeper stopto stop active automation.Reviewed October 17, 2026, 1:42 PM ET / 17:42 UTC.
feat(opencodego): expose local history in the cost command (#4629)
steipete commentedon Oct 19, 2026
Shipped in #4629 (9766555). Thanks @h3x89!
codexbar cost --provider opencodegonow 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.Port 0.79 partials (Claude limits, Cursor, OpenCode Go, Antigravity, …