You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
bug: unified session report sorts by ID instead of documented highest cost first #1718
ccusage session sorts the unified report by session ID instead of highest cost first. This makes expensive sessions hard to find and contradicts the session guide.
The last check returns false for my report. My captured run used --since 20260912 --until 20260913; those filters can be omitted or changed to a window containing your own sessions.
Expected behavior
Unified sessions should default to descending total cost, matching the guide.
Related: #903 is closed and reported last-activity sorting. This report concerns session-ID ordering in the unified report in 20.0.20.
I'll work on a fix to restore highest-cost-first ordering for unified sessions, with deterministic ties and regression coverage for table and JSON output.
Version
20.0.20 via npm/npx, macOS arm64. Source inspected at 48dfe97f336ae6f7912b4b386116e962e246ae47.
Pullfrog triage: priority:medium
Kind: bug
Maintenance fit: maintainable
Confidence: high
Unified session rows sort by period, which is session ID, while the session guide promises cost highest first. Reporter shows $0.04 first with $21.22 later. Code and docs confirm mismatch. Distinct from #903 last-activity report. Bounded sort fix preserves documented core promise.
Activity
pullfrog commentedon Sep 13, 2026
github-actions commentedon Sep 13, 2026
Pullfrog triage: priority:medium
Kind: bug
Maintenance fit: maintainable
Confidence: high
Unified session rows sort by period, which is session ID, while the session guide promises cost highest first. Reporter shows $0.04 first with $21.22 later. Code and docs confirm mismatch. Distinct from #903 last-activity report. Bounded sort fix preserves documented core promise.
Decision: kept open.
fix: sort unified sessions by descending cost (ccusage#1720)