Skip to content

Cursor sessions with no parseable timestamp get stamped with current time, inflating "today" totals #953

Closed

Description

@dhinic-swap-tmp

Summary

Cursor-provider records that lack a parseable timestamp in the source transcript appear to be stamped with the current wall-clock time (Date.now()/new Date()) at read/export time instead of being dated from the transcript or excluded. Because "today" is defined relative to the current time, this backlog of undated records gets re-bucketed into whichever day the report happens to be run on, inflating the daily/"today" total every time the tool is used — even on days with little or no real usage.

Environment

  • codeburn version: 0.9.19 (also reproduced on 0.9.15 before upgrading)
  • Install method: npm install -g codeburn
  • OS: macOS (Darwin 25.5.0, arm64)
  • Node: v25.2.1
  • Providers involved: Cursor (project label shows as generic cursor, not a resolved workspace path)

Steps to reproduce

  1. codeburn export --format json --from <today> --to <today> and save the output.
  2. Wait a few minutes (or upgrade the package) and run the same export again.
  3. Inspect the sessions array for entries where Project is cursor, grouped by Started At.

Observed behavior

In two exports taken ~15 minutes apart on the same day, the vast majority of cursor-labeled "sessions" (1032 out of 1034) shared a single identical Started At timestamp — and that timestamp shifted between the two runs to match each run's execution time almost exactly:

  • Run 1 (~13:42 local / 11:42 UTC): 1032 entries all stamped 2026-08-10T11:42:01.123Z
  • Run 2 (~13:52 local / 11:52 UTC), after upgrading 0.9.15 → 0.9.19: 1032 entries all stamped 2026-08-10T11:52:05.851Z

Only 2 of the ~1034 cursor entries had distinct, plausible timestamps corresponding to real conversation turns. Everything else collapsed onto one fallback timestamp equal to (or extremely close to) the moment the export/report was generated.

Net effect: the daily total (codeburn status, codeburn today, the menu bar "Today" figure) is dominated by this undated backlog rather than by same-day activity. In our case it read as ~€18 of "today" spend that, per the timestamp behavior above, cannot actually be same-day usage — it's a fixed pool of undated Cursor records being re-attributed to "today" on every run.

For comparison, a Claude Code session in the same period was correctly attributed: filtering its source .jsonl directly showed only 12 of 746 total messages were timestamped that day, and codeburn's own per-day export matched that (2 API calls / €1.00 for that day) — so the date-attribution logic works correctly for Claude Code transcripts. The issue appears specific to how Cursor transcripts are parsed for timestamps.

Expected behavior

Either:

  • Parse/derive a real per-record timestamp from the Cursor transcript source so records land in the correct historical day, or
  • If no timestamp can be recovered, exclude those records from day-bucketed views (today/status/menu bar) rather than defaulting them into the current day, and/or surface them in a separate "undated" bucket.

Impact

This makes the "Today" figure (CLI status/today, and the menu bar app) unreliable as a same-day usage indicator for Cursor — it can show a large, seemingly alarming daily total on days with little or no actual usage, since it's really surfacing an accumulating pool of previously-unparsed records.

Happy to share the raw export JSON (with paths/session IDs redacted) if useful for debugging.

Activity

  1. dhinic-swap-tmp commented on Aug 10, 2026

    @dhinic-swap-tmp
    Author

    Consolidating into #326, which had this exact symptom fixed twice already (v0.9.7, v0.9.15/#575) — reproduced again on 0.9.19, likely via the newer agent-transcripts JSONL parser (#55) rather than the legacy paths those fixes targeted. Full repro + version info posted there: #326 (comment)

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions