Skip to content

Attribute nested Cursor and Kimi CLI token usage once either exposes a durable session store #6045

Description

@atomantic

Problem / Goal

#5831 closed the nested-CLI token-attribution hole for Grok and Antigravity. Cursor and Kimi are still in it: transcriptFamily() returns null for both, so every nested --review-with cursor / kimi pass is recorded in data/usage.json as a chars/4 estimate against the parent provider's bucket, not their own.

#5831 gated them explicitly — "include them in the sibling-family scan only if a durable cwd-keyed session store is found during implementation". While implementing Grok/Antigravity, no such store was found for either CLI, so they were deliberately left out.

Why this is blocked rather than claimable

The work is a mechanical extension of the readers that #5831 landed — but only once there is something on disk to read. Neither CLI is currently known to persist a cwd-keyed, per-session transcript the way ~/.grok/sessions/<urlencoded-cwd>/ or ~/.claude/projects/<cwd-slug>/ do. Until one exists, there is no data source to attribute from, and estimating harder would not improve the numbers.

Acceptance (when unblocked)

  • Confirm whether current Cursor / Kimi CLI versions write a durable, cwd-keyed session store containing per-turn token counts (or at least message text).
  • If yes: add a reader alongside the Grok/Antigravity ones and extend transcriptFamily() so nested runs are attributed to cursor / kimi in data/usage.json.
  • If the store carries cumulative-per-session totals, reuse the delta/high-water handling Attribute nested Grok and Antigravity review-CLI token usage in cost reports #5831 introduced rather than summing snapshots.
  • If no store exists: record that finding here and close, rather than leaving this open indefinitely.

Re-check trigger

Revisit on a Cursor or Kimi CLI upgrade, or whenever either is added/promoted as a --review-with reviewer.

Refs #5831

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    blockedBlocked on another issue/PR — skip in autonomous claim runseffort:lowEffort: lowmodel:lightModel size: lightplanTracked by /do:replanplanner:opus-5Plan authored by the opus-5 modelreference-watchProposed from a reference-repo watch

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions