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-focused-claude-agent
Choose a head ref
Checking mergeability… Don’t worry, you can still create the pull request.
  • 4 commits
  • 16 files changed
  • 1 contributor

Commits on Nov 2, 2026

  1. fix(opencode): count Claude Agent turns once in ccusage opencode

    Tools that read each source separately, such as tokenmaxxing, add
    `ccusage claude` and `ccusage opencode` together. Since #2007 only
    unified reports skipped the OpenCode copy of Claude Agent turns, so
    those tools still counted every turn twice, once priced from the
    `opus` alias.
    
    `ccusage opencode` now goes through `ccusage_adapter_all::run_opencode`
    and skips the same rows as the unified report, so the focused reports
    add up to `ccusage daily`. Claude is read only when a loaded row
    carries a native Claude session, and an unreadable Claude source
    counts nothing, so the rows stay. `--include-claude-agent` keeps every
    row, as before.
    
    Refs #2004
    igorovh committed Nov 2, 2026
    Configuration menu
    Copy the full SHA
    ef04505 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    4bebc9a View commit details
    Browse the repository at this point in the history
  3. fix(opencode): match focused session reports by session day

    `ccusage claude session` counts only the in-window days of a session,
    while the unified session report keeps a whole session only when its
    last activity is in the window. Matching focused OpenCode session rows
    against the unified set kept the rows of a Claude session that ran past
    `--until`, so `ccusage claude session` and `ccusage opencode session`
    still counted its in-window turns twice.
    
    Focused OpenCode reports now match every report kind by session day, so
    the two focused session reports add up to the focused daily totals.
    
    Refs #2004
    igorovh committed Nov 2, 2026
    Configuration menu
    Copy the full SHA
    7f488cf View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    120267d View commit details
    Browse the repository at this point in the history
Loading