Runtime reference
Cursor#
Cursor keeps chat in a VS Code-style SQLite key-value store, and its modern Agent mode writes a separate JSONL transcript under the home directory. ClawMetry reads both, because either one alone leaves a live session looking empty.
| Runtime id | cursor |
| Category | AI IDE (editor + CLI) |
| Vendor | Anysphere |
| Tier | Paid tier (Starter and up) |
| Upstream | cursor.com |
Where the data comes from#
ClawMetry reads these locations, in order, and never writes to any of them.
~/Library/Application Support/Cursor/User/globalStorage/state.vscdb— primary (Linux: ~/.config/Cursor/…)…/workspaceStorage/<hash>/state.vscdb— older per-workspace layout~/.cursor/projects/<encoded-project>/agent-transcripts/<sid>/<sid>.jsonl— Agent mode transcripts
Format. SQLite cursorDiskKV rows (composerData:<id>, bubbleId:<composer>:<bubble>) plus Anthropic-shaped JSONL for Agent sessions.
Environment variables#
| Variable | Effect |
|---|---|
CLAWMETRY_CURSOR_DB | point at a specific state.vscdb |
CLAWMETRY_CURSOR_AGENT_ROOT | Agent-transcript root override |
CLAWMETRY_CURSOR_CHATS_ROOT | chat root override |
See Environment variables for the variables that apply to every runtime.
Tokens and cost#
Tokens. Cursor's tokenCount hint is not a billed total, and the backend is proprietary. On hosted VMs the loopback usage log is the only real token source.
Cost. Not on disk. Cursor is one of two runtimes on the token-blind allowlist for the hosted-VM usage log, which is why a Cursor row can show real cost on a managed node and none on a laptop.
Why this section exists
Runtimes differ enormously in what they persist. Rather than showing a plausible number everywhere, ClawMetry reports what the store actually contains and marks the rest unknown. A cost of $0.00 and a cost of unknown mean different things, and the dashboard keeps them different.
Sub-agents and delegation#
Sub-agent transcripts live under a subagents/ subtree of the session directory; the primary transcript is exactly <sid>/<sid>.jsonl.
Things worth knowing#
- Cursor is usually running, so recent writes sit in the
state.vscdb-walsidecar. Opening the database withimmutable=1skips the WAL and returns a stale or empty view. - A Cursor CLI session is a real process tree and can be paused or stopped. A Cursor editor conversation shares the one IDE process and cannot — the Guard tab says so per session rather than refusing the whole runtime.
- Agent-mode records carry no per-line timestamp; ClawMetry falls back to file mtime and offsets each message by a millisecond to keep order.
Verify it is being read#
# Is this runtime detected, and would this install unlock it?
clawmetry runtimes --json | jq '.runtimes[] | select(.id=="cursor")'
# Why is it locked, if it is?
clawmetry runtimes --why cursor
# Any sessions ingested yet?
curl -s 'http://localhost:8900/api/local/sessions?limit=5' \
| jq '.rows[] | {session_id, agent_id, events, cost_usd}'If detection succeeds but no sessions appear, work through Troubleshooting — the usual causes are a relocated data directory (set the override above), a session limit that is hiding older runs, or a runtime that simply has not written anything yet.