Repository navigation
fix(cli): show the recorded cost in list and show - #155
Open
namanarora00 wants to merge 2 commits into
Open
namanarora00 wants to merge 2 commits into
namanarora00 wants to merge 2 commits into
Conversation
namanarora00
force-pushed
the
fix/list-show-cost
branch
from
November 2, 2026 14:33
9c058e5 to
9557632
Compare
Contributor
There was a problem hiding this comment.
Review completed against the latest diff
Reply with feedback, questions, or to request a fix.
View guided diff | Re-trigger cubic
`list` and `show` read `usage.total_cost` or `usage.cost`, but the Claude, Copilot and Cursor engines record a run's cost as `usage.estimated_cost_usd`, so those runs always showed no cost. Read `estimated_cost_usd` first and keep `total_cost` and `cost` as fallbacks for OpenCode runs and older history.
namanarora00
force-pushed
the
fix/list-show-cost
branch
from
November 2, 2026 14:36
9557632 to
18eb15a
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
listandshownever show a cost for Claude, Copilot or Cursor runs._get_run_detailsreadsusage.total_costorusage.cost, but those engines record a run's cost in history asusage.estimated_cost_usd. That was already true whenlistwas added in #47:engineer.pywroteestimated_cost_usd, and other parts ofcli.pyread it. Solist --full,show, and their--jsonoutputs hadcost: nullfor every run except OpenCode ones.What
_get_run_detailsreadsestimated_cost_usdfirst, thentotal_costandcost, so OpenCode runs and older history entries keep working.Verification
list --json,show --jsonand theshowtable were checked against history entries recordingestimated_cost_usd,costandtotal_cost. Each now reports its cost. Onmain, theestimated_cost_usdentry reports none.pytest: 1231 passed, 10 skipped, same asmain.ruff check src testsandmypy srcare clean.This PR and #156 (OpenCode cost) each add lines in the same CHANGELOG section, so whichever merges second will need a small conflict resolution there.
Summary by cubic
Fixes
listandshowso Claude, Copilot, and Cursor runs display their recorded cost instead of always showing none.Those engines record cost as
usage.estimated_cost_usd, but_get_run_detailsonly readtotal_costorcost, so the cost was empty for every run except OpenCode ones. The fix readsestimated_cost_usdfirst, falling back tototal_costandcostfor OpenCode runs and older history entries. Adds a CHANGELOG entry under Unreleased.Written for commit 773577a. Summary will update on new commits.


Confidence Score: 5/5
Safe to merge. The focused checks found no introduced regression in cost selection or rendering.Summary
listandshownow readestimated_cost_usdbeforetotal_costandcost, restoring recorded costs for Claude, Copilot, and Cursor runs while retaining support for older history entries.No actionable issues were found in the changed code. This change is safe to merge.
T-Rex validation blocked
Evidence upload could not be completed because no upload or artifact-publication facility was available. Execution completed, but the authored test source, command captures, and observed outputs remain local files only.
Reviews (1) · Last reviewed commit: "fix(cli): show the recorded cost in list..." · Reviewed by Greptile