Skip to content

fix: bill a Cursor IDE conversation once, on its IDE row - #25

Merged
lr00rl merged 1 commit into
mainfrom
fix/20261023_cursor-ide-billed-once
Oct 23, 2026
Merged

lr00rl merged 1 commit into
mainfrom
fix/20261023_cursor-ide-billed-once

Conversation

@lr00rl

@lr00rl lr00rl commented Oct 23, 2026

Copy link
Copy Markdown
Owner

Summary

A Cursor IDE agent writes its transcript into ~/.cursor/projects under the composer's id, so every IDE conversation was also listed in the cursor (CLI) account, and the billed usage joined on that id was counted on both rows. On the author's machine this inflated the 30-day Cursor total by $616 (shown $2,197, billed about $1,530).

A cursor session whose id is a session or subagent id in a cursor-ide account is now treated as the IDE's copy:

  • it takes no billed usage in sessions, accounts, stats and show;
  • copied_from names the IDE account, so the list shows cursor ← cursor-ide;
  • show says the bill is in cursor-ide.

Both rows stay listed; dropping the copy from the scan would have left it in the index as a deleted session.

Test plan

  • New TestCursorIDECopyBilledOnce: one conversation in both accounts plus a CLI-only one; list, account totals, dashboard and detail each bill the shared one once. Fails without the fix.
  • go test ./...
  • Live index: cursor 30-day cost $1,581 → $913, cursor + cursor-ide = $1,529, matching the usage page window.

A Cursor IDE agent writes its transcript into ~/.cursor/projects under the
composer's id, the same place the Cursor CLI writes its own. The CLI scan
picks it up, so each IDE conversation was listed in both cursor and
cursor-ide, and the billed usage, joined on the conversation id, was added
to both rows. On the author's machine all 74 conversations found in both
accounts were of this kind (none has a CLI chat store), and the 30-day
Cursor total read $2,197 where the usage page billed about $1,530.

A cursor session whose id is a session or subagent id in a cursor-ide
account is now the IDE's copy: it takes no billed usage in the session
list, account totals, stats or show, and copied_from names the IDE account,
so the list shows "cursor ← cursor-ide" and show says where the bill is.

Rejected: dropping the copies from the CLI scan. The index would mark them
missing and keep them as deleted sessions, and the transcript is still a
readable record of the conversation.
Tested: go test ./...; on the live index cursor went from $1,581 to $913
over 30 days, cursor plus cursor-ide is $1,529.
@lr00rl
lr00rl merged commit d46fb15 into main Oct 23, 2026
2 checks passed
@lr00rl
lr00rl deleted the fix/20261023_cursor-ide-billed-once branch October 23, 2026 09:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant