Skip to content
Hindsight
Esc
↑↓navigate↵open⌘Jpreview
On this page

Cursor

Cursor is two connections, one for its agent and one for your typing. Here's what each installs and sees.

Cursor counts as two tools. Its agent (and Tab completions) report through hooks. Your own typing and diff reviews report through the Hindsight extension, the same one VS Code uses. Hindsight sets up both on its own. Nothing needs trusting or approving.

Cursor counts as installed once ~/.cursor exists or its cursor command is found, so a fresh install is picked up before you’ve even opened it.

The agent: what gets installed

Hooks go in ~/.cursor/hooks.json (on Windows, C:\Users\you\.cursor\hooks.json). Hindsight creates the file and folder if they’re missing. It adds one hook, with a timeout of 5, to each of eight events:

Event What Hindsight does with it
beforeSubmitPrompt Records your prompt and the start of a run
postToolUse Records a tool call (edits are recorded from afterFileEdit instead)
postToolUseFailure Records a tool call that failed
afterFileEdit Records an edit, with its lines counted once
afterAgentResponse Remembers how long the reply was, for the run’s end
stop Ends the run, with the tokens it used
afterTabFileEdit Remembers the lines of an accepted Tab completion
sessionStart Remembers whether this is a background agent

The file looks like this:

{
  "version": 1,
  "hooks": {
    "beforeSubmitPrompt": [
      { "command": "& 'C:\\Users\\you\\AppData\\Local\\Hindsight\\hindsight-daemon.exe' emit --source cursor-agent", "timeout": 5 }
    ]
  }
}

On Windows, Cursor runs hooks through PowerShell, so the path is called with & and single quotes. On macOS and Linux it’s a plain quoted path. Hooks you already have are left alone, and Hindsight’s sit beside them. Cursor reloads the file when it changes.

The agent: what Hindsight sees

  • Your prompts. A length and a keyed hash. A prompt to a background agent isn’t yours: it starts a run but doesn’t count as a prompt.
  • Runs. A prompt starts one. stop ends it. If you stopped the agent (Cursor reports aborted), the run is marked as stopped by you.
  • Tool calls. The tool, how long it took, whether it failed. For file edits it counts lines added and removed from the edit itself, takes the language from the extension and keeps a hashed path.
  • Tokens and model. Cursor sends the turn’s usage with stop. Cached input is kept apart from plain input. When Cursor’s model is “default” (Auto), no model name is recorded.
  • Tab completions. Nothing goes on your timeline. The lines you accept are hashed and kept on your computer, so a later commit can tell which lines the AI wrote.

Cursor puts your email on every payload. Hindsight never reads it, or failure messages, or tool output. The agent’s reply is read only for its length.

Your typing: the extension

Typing in Cursor is the VS Code extension’s job, and Hindsight installs it into Cursor with Cursor’s own cursor --install-extension command. What it counts is on the VS Code page. Cursor’s inline accept and reject buttons don’t show the extension a diff, so it also counts a while spent reading a file the agent just changed as a review.

The extension isn’t installed if Hindsight can’t find Cursor’s cursor command. The connect line then says skipped: can't find its cursor command.

Things to know

  • Cursor’s CLI runs your Claude Code hooks too. If you’ve also got Claude Code connected, Cursor’s CLI runs those hooks as well. Hindsight notices (Cursor sets CURSOR_VERSION for them) and ignores them, so nothing is counted twice.
  • Commits. A commit made from Cursor’s agent shell is recorded as the agent’s (Hindsight checks CURSOR_AGENT). See Commits.

Check that it’s working

Send Cursor’s agent a prompt and look for it on the timeline on your Today page. For typing, see the checks on the VS Code page. The setup step shows both parts under one “Cursor” row.

Disconnect

hindsight-daemon disconnect

This removes Hindsight’s hooks from ~/.cursor/hooks.json (the file is deleted if only its version is left) and runs cursor --uninstall-extension hackclub.hindsight. It comes back at Hindsight’s next start unless you uninstall Hindsight.

Was this page helpful?