codeburn/src
Ilia Alshanetsky 4e22a8e09f
fix: count every Cursor Agent assistant message instead of one turn per user message (#1513)
* fix: count every Cursor Agent assistant message instead of one turn per user message

Agentic loops emit dozens of assistant messages per user message and
the parser kept only the first (on one real corpus: 247 of 4,946
messages, ~4% of assistant text). Each message now carries the last
user message forward, tool_use inputs join the output text, and input
tokens use the full user text while the display stays truncated at
500 chars. Parse version bumped so cached sessions re-parse.

* cursor-agent: a transcript that ended before any assistant message is not an unrecognized format

* cursor-agent: bill the user text once per user message, not once per assistant message

* cursor-agent: re-derive finalized days and cached sessions under the new accounting

---------

Co-authored-by: Resham Joshi <65915470+iamtoruk@users.noreply.github.com>
2026-09-24 21:02:00 +02:00
..
act fix(windows): nine Windows path and process bugs the CLI tests exposed 2026-09-02 13:43:57 -07:00
data chore(pricing): add Opus 5.5 to the bundled snapshot (#1537) 2026-09-24 02:54:54 +02:00
guard fix: keep macOS and Linux path behaviour exact in guard flags and Hermes 2026-09-02 15:11:01 -07:00
mcp fix(sharing,mcp): drop or pseudonymize pull request rows in redacted payloads 2026-09-14 17:53:04 +03:00
plugins fix(windows): nine Windows path and process bugs the CLI tests exposed 2026-09-02 13:43:57 -07:00
providers fix: count every Cursor Agent assistant message instead of one turn per user message (#1513) 2026-09-24 21:02:00 +02:00
quota Claude quota: recover the credential from the source it came from (#1516) 2026-09-23 18:16:23 +02:00
sharing fix(sharing,mcp): drop or pseudonymize pull request rows in redacted payloads 2026-09-14 17:53:04 +03:00
sync 0.9.25: correctness, energy, menu bar and installer fixes (#1511) 2026-09-21 00:16:21 +02:00
antigravity-statusline.ts fix(windows): nine Windows path and process bugs the CLI tests exposed 2026-09-02 13:43:57 -07:00
audit-report.ts fix: four cost accuracy bugs in export and pricing (#1544) 2026-09-24 15:55:23 +02:00
bash-utils.ts perf(classifier): linear bash separator split 2026-08-16 18:31:41 -07:00
behavioral-weight.ts 0.9.25: correctness, energy, menu bar and installer fixes (#1511) 2026-09-21 00:16:21 +02:00
billing-filter.ts feat(cli): filter usage by billing route and mode (#1486) 2026-09-19 11:32:06 -07:00
branch-spend.ts Consistent period totals and incremental refresh (#1467) 2026-09-17 12:35:05 +02:00
budget.ts
cache-dir.ts fix(cache): treat a present versioned result file as exclusive 2026-08-22 01:49:39 +05:30
cache-refresh-lock.ts fix(lock): heartbeat replaces the lock body atomically instead of truncating in place 2026-08-30 03:29:01 -07:00
cache-sweep.ts 0.9.25: correctness, energy, menu bar and installer fixes (#1511) 2026-09-21 00:16:21 +02:00
classifier.ts fix(insights): count read-shaped shell commands as reads, not as verification (#941) 2026-08-10 06:07:27 -07:00
cli-date.ts
cli.ts fix(cli): default NODE_ENV to production so Ink's React build stops leaking user-timing entries. 2026-09-07 10:27:46 -03:00
codex-cache.ts perf: load only the session-cache members a date range can use (#1542) 2026-09-24 19:52:42 +02:00
codex-credits.ts 0.9.25: correctness, energy, menu bar and installer fixes (#1511) 2026-09-21 00:16:21 +02:00
codex-throughput.ts fix(codex): exclude harness startup and fix partial-dedup timing in Tok/s 2026-08-21 15:29:14 -07:00
compare-cohorts.ts feat(models): carry the billing route on the call and key model rows on it (#1448) 2026-09-17 13:32:34 +02:00
compare-stats.ts 0.9.25: correctness, energy, menu bar and installer fixes (#1511) 2026-09-21 00:16:21 +02:00
compare.tsx fix: uncap the Overview model table, billions token rung, unpriced calls dimming (#1443) 2026-09-17 13:53:10 +02:00
config.ts 0.9.25: correctness, energy, menu bar and installer fixes (#1511) 2026-09-21 00:16:21 +02:00
content-utils.ts fix(parser): flatten already-sliced previews and memoize canonical path walks 2026-08-16 01:49:10 -07:00
context-budget.ts fix(context-budget): stop double-counting home skills and CLAUDE.md 2026-08-04 06:32:58 +03:00
context-tree-codex.ts
context-tree.ts context: Fable and Mythos 5 report a 1M window (#1522) 2026-09-23 16:35:29 +02:00
context-tui.tsx fix(cli): default NODE_ENV to production so Ink's React build stops leaking user-timing entries. 2026-09-07 10:27:46 -03:00
copilot-aiu.ts feat: Copilot AI Credit plan math from total_nano_aiu 2026-08-23 19:12:04 +05:30
currency.ts test: skip the live Frankfurter fetch so FX moves can't shift assertions 2026-08-21 02:23:41 -07:00
cursor-cache.ts 0.9.25: correctness, energy, menu bar and installer fixes (#1511) 2026-09-21 00:16:21 +02:00
daily-cache.ts fix: count every Cursor Agent assistant message instead of one turn per user message (#1513) 2026-09-24 21:02:00 +02:00
dashboard.tsx 0.9.25: correctness, energy, menu bar and installer fixes (#1511) 2026-09-21 00:16:21 +02:00
day-aggregator.ts 0.9.25: correctness, energy, menu bar and installer fixes (#1511) 2026-09-21 00:16:21 +02:00
doctor.ts windows: discover provider roots inside WSL distros (#1062) 2026-09-19 12:33:29 -07:00
export.ts fix: four cost accuracy bugs in export and pricing (#1544) 2026-09-24 15:55:23 +02:00
fetch-utils.ts
format.ts 0.9.25: correctness, energy, menu bar and installer fixes (#1511) 2026-09-21 00:16:21 +02:00
fs-utils.ts perf: fan out the discovery sweep instead of walking it one syscall at a time 2026-08-22 15:52:47 -07:00
git-origin.ts Consistent period totals and incremental refresh (#1467) 2026-09-17 12:35:05 +02:00
granular-history.ts fix(web): count legend title uniqueness in code points 2026-08-21 21:59:13 +05:30
hermes-session-ledger.ts feat(cli): filter usage by billing route and mode (#1486) 2026-09-19 11:32:06 -07:00
ink-win.ts fix(ink-win): strip synchronized-update escapes instead of exact-matching them 2026-08-04 03:06:47 +03:00
launcher-homes.ts Grok Bot: sessions, estimated spend and the weekly allowance on all three surfaces (#1462) 2026-09-16 21:17:48 +02:00
live-sessions.ts feat(models): carry the billing route on the call and key model rows on it (#1448) 2026-09-17 13:32:34 +02:00
main.ts perf: load only the session-cache members a date range can use (#1542) 2026-09-24 19:52:42 +02:00
math-utils.ts dashboard: fold instead of spread when measuring column widths (#1460) 2026-09-16 18:52:02 +02:00
menubar-installer.ts fix(menubar): older menubar apps load again, and in-app Update restarts the app (#1548) 2026-09-24 20:07:25 +02:00
menubar-json.ts fix(menubar): older menubar apps load again, and in-app Update restarts the app (#1548) 2026-09-24 20:07:25 +02:00
model-breakdown.ts feat(models): carry the billing route on the call and key model rows on it (#1448) 2026-09-17 13:32:34 +02:00
model-efficiency.ts 0.9.25 round 2: fixes found testing the built apps (#1517) 2026-09-21 13:53:45 +02:00
models-report.ts 0.9.25: correctness, energy, menu bar and installer fixes (#1511) 2026-09-21 00:16:21 +02:00
models.ts fix: four cost accuracy bugs in export and pricing (#1544) 2026-09-24 15:55:23 +02:00
optimize.ts optimize: flag sessions with a low prompt cache hit rate (#1536) 2026-09-24 02:54:50 +02:00
overview.ts 0.9.25: correctness, energy, menu bar and installer fixes (#1511) 2026-09-21 00:16:21 +02:00
parse-worker.ts perf(parse-workers): gate on pending bytes, size the per-worker budget per parse 2026-08-17 02:53:19 -07:00
parse-workers.ts perf(parse-workers): gate on pending bytes, size the per-worker budget per parse 2026-08-17 02:53:19 -07:00
parser.ts perf: store the session cache in day pieces (#1550) 2026-09-24 20:45:35 +02:00
path-privacy.ts fix(sync): address project privacy review 2026-08-24 20:09:27 +05:30
period-diff.ts Compare periods: lead sentence, three tiles, day bars, top movers (#1446) 2026-09-15 23:12:12 +02:00
persistent-codeburn.ts
plan-usage.ts docs(plan): calibrate the Copilot credit estimate wording against real session-store rows (#1199) 2026-08-31 03:13:04 -07:00
plans.ts feat: Copilot AI Credit plan math from total_nano_aiu 2026-08-23 19:12:04 +05:30
project-filter-warnings.ts fix(cli): judge a pattern against the day cache, and never on screen 2026-09-11 17:29:55 +02:00
quota.ts
serve.ts 0.9.25: correctness, energy, menu bar and installer fixes (#1511) 2026-09-21 00:16:21 +02:00
session-cache.ts fix: count every Cursor Agent assistant message instead of one turn per user message (#1513) 2026-09-24 21:02:00 +02:00
session-contributions.ts 0.9.25: correctness, energy, menu bar and installer fixes (#1511) 2026-09-21 00:16:21 +02:00
session-count-label.ts fix(usage): fold Windows case in spend identity, qualify --json counts, drop scratch tests 2026-09-07 14:56:32 -07:00
session-output.ts fix: uncap the Overview model table, billions token rung, unpriced calls dimming (#1443) 2026-09-17 13:53:10 +02:00
session-population.ts fix(optimize): isolate sidechains from behavior 2026-08-14 02:51:54 +05:30
sessions-report.ts feat(models): carry the billing route on the call and key model rows on it (#1448) 2026-09-17 13:32:34 +02:00
sessions-tui.tsx fix(cli): default NODE_ENV to production so Ink's React build stops leaking user-timing entries. 2026-09-07 10:27:46 -03:00
spend-flow.ts fix(cli): judge a pattern against the day cache, and never on screen 2026-09-11 17:29:55 +02:00
sqlite.ts fix: stop a Full Disk Access blocked Warp read from freezing serve, and harden the Grok Bot quota reader (#1487) 2026-09-18 15:23:22 -07:00
status-snapshot-semantic.ts fix: four provider parsing and pricing attribution bugs (#1489) 2026-09-18 15:15:10 -07:00
streak.ts Consistent period totals and incremental refresh (#1467) 2026-09-17 12:35:05 +02:00
telemetry-snapshot.ts feat(models): carry the billing route on the call and key model rows on it (#1448) 2026-09-17 13:32:34 +02:00
text-table.ts dashboard: fold instead of spread when measuring column widths (#1460) 2026-09-16 18:52:02 +02:00
token-estimate.ts
types.ts 0.9.25: correctness, energy, menu bar and installer fixes (#1511) 2026-09-21 00:16:21 +02:00
usage-aggregator.ts 0.9.25 round 2: fixes found testing the built apps (#1517) 2026-09-21 13:53:45 +02:00
user-timing-guard.ts fix(cli): clear the user-timing buffer blind on the guard tick. 2026-09-07 10:57:14 -03:00
web-dashboard.ts fix(dash): keep the disambiguator visible, make the bootstrap safe by construction 2026-08-18 05:49:16 +03:00
work-units.ts feat(sessions): deterministic work-unit resolver and sessions --by-work-unit (CB-2 slice 1) (#1145) 2026-08-25 09:30:05 -07:00
workflow-insights.ts fix(optimize): isolate sidechains from behavior 2026-08-14 02:51:54 +05:30
wsl.ts windows: discover provider roots inside WSL distros (#1062) 2026-09-19 12:33:29 -07:00
yield.ts fix(yield): rescue sessions whose branch shipped past the session's window (#1476) 2026-09-18 17:10:27 -07:00