Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: ccusage/ccusage
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: main
Choose a base ref
...
head repository: igorovh/ccusage
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: fix/opencode-claude-agent-dedup
Choose a head ref
Checking mergeability… Don’t worry, you can still create the pull request.
  • 2 commits
  • 9 files changed
  • 1 contributor

Commits on Oct 31, 2026

  1. fix(opencode): count Claude Agent sessions once in unified reports

    OpenCode's claude-agent provider runs Claude Code, which writes its own
    transcript, so unified reports counted every Claude Agent turn twice.
    
    OpenCode v2 rows record the Claude Code session as
    content[].native.sessionID. Unified reports now skip OpenCode rows whose
    native session has a Claude transcript on disk. The Claude transcript
    holds the same tokens plus the resolved model ID, while OpenCode stores
    only the `opus` alias, which ccusage priced as an older Opus.
    
    Skipped sessions still count as covered, so the cumulative session_v2
    aggregate cannot bring the usage back. When the transcript is gone, the
    OpenCode rows are counted. `ccusage opencode` keeps every row.
    
    Refs #2004
    igorovh committed Oct 31, 2026
    Configuration menu
    Copy the full SHA
    8413dfd View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    df56052 View commit details
    Browse the repository at this point in the history
Loading