Skip to content

feat: Cost per session breakdown (not just totals) #68

@vivekchand

Description

@vivekchand

Overview

Show per-session cost and token usage in the Sessions tab, not just aggregate totals.

What to show

  • Cost column in sessions list: $0.043
  • Token breakdown: input / output / cache tokens per session
  • Session cost chart: bar chart of top 10 most expensive sessions
  • Alert threshold: flag sessions > $X (user-configurable)

Why

From the community: 'A runaway loop looks normal on a weekly total but obvious when you see 200 API calls in 3 minutes. Look for per-session or per-run breakdowns.' This is the #1 actionable metric for cost control.

Implementation notes

  • Cost data is already in session JSONL (total_cost, total_tokens fields)
  • Add cost column to sessions table (hidden by default on mobile)
  • Sort by cost option in session filter
  • Multi-provider: Claude, Gemini, OpenAI — per model rate table

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions