Repository navigation
Closed as not planned
Labels
P2Normal priority bug or improvement with limited blast radius.Normal priority bug or improvement with limited blast radius.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:ux-frictionUser-facing flow adds avoidable confusion or support burden without fully blocking progress.User-facing flow adds avoidable confusion or support burden without fully blocking progress.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
Codex already shows cost per session: codexbar cost --group-by session (#2854) and the Cost > Conversations list with titles (#4434). Claude and Pi do not. The same command prints:
Skipping session grouping for providers without Codex session data: Claude
Skipping session grouping for providers without Codex session data: Pi
Request
- Support
--group-by sessionand--group-by projectfor Claude and Pi. - Show the Conversations list for Claude and Pi in the menu and in Usage & Spend. For Pi, use the session name from the
session_inforecord as the title. - Optional: add up sessions whose names start with the same task id, so one task split across a few sessions shows one total.
The data already exists
Both tools write one log file per session, with token usage on each assistant message:
- Claude Code:
~/.claude/projects/<project-folder>/<session-id>.jsonl. Each line hassessionId. Each assistant message hasmessage.usagewithinput_tokens,output_tokens,cache_read_input_tokensandcache_creation_input_tokens. - Pi:
~/.pi/agent/sessions/<cwd>/<timestamp>_<session-id>.jsonl. Each assistant message hasusagewithinput,output,cacheRead,cacheWrite,cacheWrite1handusage.cost.total. Asession_inforecord holds the session name inname.
Why
I want to see what each task costs. A task is usually one session, sometimes a few.
Reacted by clawsweeper
Metadata
Metadata
Assignees
Labels
P2Normal priority bug or improvement with limited blast radius.Normal priority bug or improvement with limited blast radius.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:ux-frictionUser-facing flow adds avoidable confusion or support burden without fully blocking progress.User-facing flow adds avoidable confusion or support burden without fully blocking progress.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 Nov 4, 2026
Codex review: this still needs some work.
Summary
Keep open: Claude and Pi still lack session/project cost breakdowns on main, and the repository requires conservative handling of feature requests.
Reproducibility: Current source and explicit CLI tests establish the reported omission; no command against real accounts or live reproduction was run.
Next step
Decide whether to prioritize Claude/Pi session and project parity, with task-prefix aggregation considered separately.
Review details
Best possible solution:
Extend the existing breakdown models with Claude/Pi adapters and shared presentation while preserving privacy, accounting, and estimate labels.
Do we have a high-confidence way to reproduce the issue?
Current source and explicit CLI tests establish the reported omission; no command against real accounts or live reproduction was run.
Is this the best way to solve the issue?
Provider adapters feeding the existing breakdown models are appropriate; displaying recorded Pi costs or merging task-name prefixes would require additional policy beyond presentation parity.
AGENTS.md: found and applied where relevant.
Remaining risk / open question:
Codex review notes: model internal, reasoning medium; reviewed against 897bff31731b.
Label changes
Label changes:
No label changes.
Label justifications:
P2: Useful parity improvement with limited blast radius; aggregate cost reporting remains available.impact:ux-friction: Users cannot inspect Claude/Pi task costs through the conversation views and grouping commands already available for Codex.Evidence reviewed
Acceptance criteria:
What I checked:
Sources/CodexBarCLI/CLICostCommand.swift:603, 897bff31731b)Sources/CodexBarCore/CostUsageFetcher.swift:733, 897bff31731b)Tests/CodexBarTests/CLICostTests.swift:83, 897bff31731b)Sources/CodexBarCore/PiFamilySessionScanner.swift:102, 897bff31731b)docs/pi.md:16, 897bff31731b)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 November 4, 2026, 3:34 PM ET / 20:34 UTC.
steipete commentedon Nov 7, 2026
Thanks for describing the log formats. We checked the current command: session/project grouping and the Conversations view remain Codex-only. Adding Claude and Pi needs persistent session/project attribution, deduplication, incremental updates, and matching UI behavior; it is not just enabling the existing CLI switch. We're closing this parity request rather than keeping it as an open commitment. A focused implementation for one provider with synthetic ownership and append/update coverage would be a basis to reconsider. Existing ungrouped cost totals remain available.
oryband commentedon Nov 8, 2026
I opened two focused PRs for this, one per provider, as you suggested:
Each one stores session and project attribution in the cache, keeps the existing dedup, handles appends, and adds
--group-by session|projectplus the menu views. All tests use synthetic data.