You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Today usage for Cursor can become abnormally high (cost/calls), especially when Cursor keeps running for a long time.
Observed pattern:
Today shows inflated values.
Next day, previous day looks normal again.
But the new Today becomes inflated again.
This looks like historical records being repeatedly bucketed into the current date.
Likely cause
In src/providers/cursor.ts, bubbleId:% rows are mostly guarded by createdAt, but agentKv:blob:% rows do not have reliable per-row timestamps.
The agentKv path uses a shared runtime-derived timestamp (DB mtime / now fallback behavior), so older usage can drift into whatever day the command runs.
Suggested fix
Do not assign new Date() (or runtime-derived day) to rows without reliable timestamps.
Safest approach: skip agentKv rows for day-based stats until per-row timestamps are available.
If Cursor later provides a stable timestamp field in agentKv, only include rows with valid parsed timestamps.
Note
I used AI-assisted code tracing to locate and verify the affected parse paths quickly, sharing this as a reference for maintainers.
Agreed this overlaps #326, but the day-bucketing failure has an extra consequence worth calling out: the same agentKv:blob:% rows that drift into "Today" also corrupt lifetime rollups if they're summed without a reliable timestamp. The pragmatic fix is to exclude agentKv rows from any time-bounded aggregation until per-row timestamps exist (and only count them in a timestamp-agnostic total), rather than trying to bucket unbucketable rows. That at least stops the "Today" inflation without a schema migration. A per-row ts on those keys would be the real fix but is a bigger change.
Fixed: Cursor usage is attributed to the conversation/turn day instead of the drifting agentKv timestamp (#254, hardened in #575), so Today no longer inflates while Cursor stays running. Covered by a regression test.
Activity
tekumara commentedon Jun 23, 2026
Dupe of #326
hiSandog commentedon Jun 29, 2026
Agreed this overlaps #326, but the day-bucketing failure has an extra consequence worth calling out: the same
agentKv:blob:%rows that drift into "Today" also corrupt lifetime rollups if they're summed without a reliable timestamp. The pragmatic fix is to excludeagentKvrows from any time-bounded aggregation until per-row timestamps exist (and only count them in a timestamp-agnostic total), rather than trying to bucket unbucketable rows. That at least stops the "Today" inflation without a schema migration. A per-rowtson those keys would be the real fix but is a bigger change.iamtoruk commentedon Jul 20, 2026
Fixed: Cursor usage is attributed to the conversation/turn day instead of the drifting agentKv timestamp (#254, hardened in #575), so Today no longer inflates while Cursor stays running. Covered by a regression test.