How to track time in Cursor
Last updated: November 2026
A prompt in Cursor starts a change, an agent runs while you read the diff, and on a busy day two windows do that in parallel. The hours are real, but they don’t arrive as one block you can point at. Here is where Cursor keeps that work and how you turn it into hours.
Where Cursor keeps your history
Cursor is a fork of VS Code and stores its state the same way: in SQLite databases called state.vscdb. On a Mac they sit under ~/Library/Application Support/Cursor/User/, one per workspace in workspaceStorage/<hash>/ plus a global one in globalStorage/. A workspace.json next to each maps the hash back to the project folder.
That means the timestamps are on your disk, but not in a file you can read line by line like a Claude Code transcript. You would have to query an undocumented database whose layout changes between releases. Hooks are the easier way in.
Cursor hooks
Cursor runs hooks at moments in the agent’s life, among them sessionStart, sessionEnd, beforeSubmitPrompt, afterFileEdit and stop. You configure them in ~/.cursor/hooks.json for all projects or in .cursor/hooks.json in a repo. A sessionStart and a sessionEnd hook that append a timestamp and the folder to a file give you raw session times. The format differs from Claude Code’s, so you can’t copy a Claude Code hook over as it is.
Your options
- WakaTime: the regular VS Code extension installs in Cursor. Search for “wakatime” under Extensions, paste your API key, and your activity per project, file and branch goes to WakaTime’s dashboard. Cloud, with an account.
- trackmy.codes: a Mac app that detects Cursor, Claude Code, Codex and Antigravity and turns active time into a daily streak. Local, no account, no clients or rates.
- Your own hooks: free and local, but you pair start and end yourself and keep the script working.
- Døgn: a local time tracker for Mac, Windows and Linux. It does not detect Cursor sessions. See below for how it fits anyway.
Cursor and Døgn
Døgn doesn’t read Cursor’s database. You track Cursor work like any other work: type what you’re doing, pick the project, press Start. A second project at the same time? ⇧ ↵ starts it in parallel, on its own line. If you forgot, the timeline on Today hatches the gap, and “Review the day” lists it for you to fill in.
Two things save clicks. Døgn’s local MCP server can be connected to Cursor, so Cursor’s agent can start or stop a timer when you ask it to. And if you run Claude Code or Codex in Cursor’s terminal, those sessions are tracked on their own once you switch that on. See automatic time tracking for Claude Code.
Questions, answered
Does Cursor track time by itself?
No. Cursor keeps its agent history in local SQLite databases, but it shows no time report. You need hooks or a separate tool.
Can I use WakaTime with Cursor?
Yes. Cursor is a VS Code fork, so the normal WakaTime extension installs from Cursor’s Extensions panel. Your activity goes to WakaTime’s cloud.
Does Døgn detect Cursor sessions?
No. Døgn detects Claude Code, Codex and Antigravity sessions. For Cursor you start a timer, or fill the gap later. Through its MCP server, Cursor’s agent can start a Døgn timer when you ask.