cursorDiskKV table records always show 0 for tokenCount

Where does the bug appear (feature/product)?

Somewhere else…

Describe the Bug

I’m trying to gather token usage on a per-request basis. It looks like that feature has already been submitted for hook payloads here: Cursor Hooks: Token Usage Support

However, looking at the transcript records in the cursorDiskKV table, I see that each bubble record has a tokenCount.inputTokens and tokenCount.outputTokens, but these are always zero. Should we be seeing meaningful data here? That would give power users more granular token-usage data

Steps to Reproduce

Connect to the local SQLite database for Cursor and observe that every bubble record has 0 for tokenCount.inputTokens and tokenCount.outputTokens

Screenshots / Screen Recordings

Operating System

MacOS

Version Information

Version: 2.6.21
VSCode Version: 1.105.1
Commit: fea2f546c979a0a4ad1deab23552a43568807590
Date: 2026-03-21T22:09:10.098Z (5 days ago)
Build Type: Stable
Release Track: Default
Electron: 39.8.1
Chromium: 142.0.7444.265
Node.js: 22.22.1
V8: 14.2.231.22-electron.0
OS: Darwin arm64 25.3.0

Does this stop you from using Cursor

No - Cursor works, but with this issue

Hey, thanks for the report. I see the screenshot where tokenCount is showing zero values.

The tokenCount field in cursorDiskKV records is best-effort. After the stream ends, the client tries to fetch token data from the backend, but it doesn’t always work because of timing. In practice, these fields aren’t reliable right now and they aren’t the main source of truth for token usage.

To track usage, it’s better to rely on the Usage Dashboard at https://cursor.com/settings in your account settings since the data there is accurate.

For more granular per-request data, you found the right feature request: Cursor Hooks: Token Usage Support

1 Like

This topic was automatically closed 22 days after the last reply. New replies are no longer allowed.