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

What is recorded

Every field Hindsight keeps about your work, per editor, agent, Byte and git, and what stays on your computer only.

Everything Hindsight records is an event: a small JSON record in a database on your computer. This page lists what an event can hold, then what each source puts in it. What is uploaded covers what goes to the server.

A real event

This is the shape of a prompt you sent to Claude Code. The prompt itself is nowhere in it.

{
  "schema_version": 1,
  "id": "0195f0c2-7c1a-7b3e-9d41-5a6c0e2f8b17",
  "ts": 1795270687000,
  "source": "claude_code",
  "kind": "prompt_submitted",
  "project": "hindsight",
  "meta": {
    "text_len": 142,
    "content_hash": "9f3a…c41e",
    "session_hash": "b07d…52a9"
  }
}

ts is unix milliseconds. text_len is the prompt’s length in characters. The two hashes are 64 hex characters each (shortened here). Claude Code can’t tell Hindsight whether you typed or pasted a prompt, so typed_permille stays empty for it.

An edit in VS Code looks like this:

{
  "schema_version": 1,
  "id": "0195f0c3-02e4-7d10-8a55-1c9e44b7a3d2",
  "ts": 1795270702000,
  "source": "editor",
  "kind": "editor_activity",
  "project": "hindsight",
  "meta": {
    "text_len": 120,
    "typed_permille": 250,
    "deleted_keys": 6,
    "entity_hash": "41c8…07fe",
    "language": "Rust",
    "app": "VS Code"
  }
}

You changed 120 characters in a Rust file, and a quarter of them were typed by hand. The file’s name isn’t in there, only a keyed hash of its path.

The closed list of fields

An event’s meta is a closed struct. A field that isn’t on this list is rejected when an event is read, so a buggy tool can’t slip extra text in. Several fields are also fenced to certain kinds of event: tool outcomes only on tool calls, tokens and the model only on a finished run, branches only on commits and snapshots, your words only on Byte answers and notes. Your computer and the server both check that.

Field What it holds Found on
text_len Length in characters of the text the event is about Prompts, editor edits, Byte answers and notes
typed_permille Share of that text that was typed, not pasted, from 0 to 1000 Editor edits
deleted_keys How many of the typed keystrokes only deleted. A count, never what was deleted Editor edits
content_hash Keyed hash of the text Prompts, Byte answers and notes
session_hash Keyed hash of the agent’s session id Agent events
entity_hash Keyed hash of a file’s path Tool calls, editor events
tool_name The tool’s name, like Edit or Bash Tool calls
language Programming language, from the file’s extension Tool calls, editor events
lines_added, lines_removed Line counts Tool calls, commits
duration_ms How long a tool call took Tool calls
tool_failed, interrupted Whether a call failed, and whether it was aborted. Never why Tool calls
interrupts How many times you stopped the agent to end this run Finished agent runs
model The model’s id, like claude-opus-5-5. Letters, digits and -._[] only, 64 characters at most Finished agent runs
input_tokens, output_tokens, cache_read_tokens, cache_write_tokens How many tokens the run used Finished agent runs
reply_len How many characters of text the agent showed you. A count, never the text Finished agent runs
git_branch, commit_hash Branch name (120 characters at most) and the short commit hash Commits, snapshots
files_changed Files in a commit, or uncommitted files at a snapshot Commits, snapshots
typed_lines, agent_lines Of the code lines a commit adds, how many you typed and how many you didn’t Commits
app The app you were in, by one of a fixed list of names (VS Code, Zed, Terminal) Input, focus and editor events
checkin_kind question, note or snapshot Byte check-ins
checkin_text What you wrote to Byte, 4,000 characters at most Byte answers and notes only
evidence_hash A salted hash that commits to a snapshot’s picture Snapshots
receipt The server’s upload receipt Receipt events, which carry nothing else

Outside meta, an event has schema_version, id, ts, source, kind and project. The project name is usually the folder name of the git repo you were working in. source is one of claude_code, editor, desktop, daemon, browser, git, or the name of another agent (opencode, zed-agent, codex, cursor-agent, antigravity-agent).

A few of these are free text that the daemon fills in: project, tool_name and language. They come from folder names, tool names and file extensions, not from your content. The server sets aside an event whose project is longer than 512 characters or whose other short fields are over 128.

Editors

The VS Code and Cursor extension and the Zed language server tell the daemon what you did in a file, in two kinds of report that become events:

  • Edit. The extension counts the characters you typed, apart from everything else that changed the file: pastes, completions, snippets, an agent rewriting an open file. A keystroke is a change of at most two visible characters. If the same key repeats within 150 ms, only the first three count, so a held key doesn’t pile up.
  • Review. You spent a while looking at a diff you hadn’t looked at yet, or reading a file an agent edited.

Reading a file nobody edited records nothing. When an agent edits a file, the daemon remembers a hash of the path and the time for 24 hours, only on your computer, so that your next read of that file can count as a review of that edit.

The extension sends the file’s path to the daemon so it can name the project and the language. The daemon hashes the path and throws the path away. The extension also sends the lines you typed, which the daemon hashes with your key and drops (see Only on your computer). If you point a WakaTime or Hackatime plugin at the daemon, its file path or domain is hashed the same way.

Agents

Each agent reaches Hindsight through its own hooks or log files. In every case the prompt, the files and the tool output are read for a length, a line count or a hash, and then dropped.

Claude Code. On each prompt: its length and hash. On each tool call: the tool’s name, how long it took, whether it failed, a hash of the file path, the language, and how many lines it added and removed. A failed call’s error message is never read. When a run finishes, the daemon reads the session’s transcript for the model id, the token counts and how many characters of reply you were shown, and for whether you stopped the run. It keeps nothing else from the transcript.

OpenCode. The plugin sends the same payloads as Claude Code, with the run’s token counts added, since OpenCode keeps no transcript.

Codex. The same hook payloads, plus the model and token usage. From the agent’s last message only the length is kept. The first line of the session transcript is read for one thing: whether the session is a headless codex exec.

Cursor’s agent. The same again. The user_email field Cursor puts on every payload is never read, and neither is a failure’s error message. The agent’s reply is read for its length only.

Antigravity. The daemon reads the conversation transcript for step types, times, token counts and the model. Your prompts count for a length and a hash. A failed tool’s error is checked only for whether it’s empty.

Zed’s own agent. It has no hooks, so the daemon reads Zed’s saved threads, read-only. A prompt becomes a length and a hash. A tool call becomes its name, line counts and a hash of the file’s path.

Prompts that nobody typed don’t count as prompts. That covers background-task notices Claude Code feeds itself, a Codex subagent’s task, and anything sent to a headless claude -p or codex exec. They start an agent run and nothing else.

Byte

When you answer one of Byte’s questions or write a note, the event carries your words as checkin_text, up to 4,000 characters, plus text_len and content_hash of the same text. It’s the one place Hindsight keeps text you wrote. It isn’t a prompt and it isn’t code: only Byte answers and notes may carry it.

Skipping a question records nothing. Byte’s question itself isn’t recorded either, only your answer.

A snapshot is a check-in with no text. Hindsight takes a picture of the screen only when you ask for a snapshot, never on its own. It captures the monitor under your cursor, with Hindsight’s own windows hidden for that moment, and saves a full picture and a thumbnail in the snapshots folder of your data folder. The snapshot’s event carries evidence_hash, and when the project’s repo is known, the branch, the short commit hash and how many files are uncommitted. The picture is never in the event. See what is uploaded for what happens to it next.

Git

When an agent works in a repo, Hindsight adds a post-commit hook to that repo’s .git/hooks, unless the repo already has its own hook or you set HINDSIGHT_GIT_HOOK=off. You can also add it yourself:

hindsight-daemon install-git-hook

After each commit the hook records the time, the project, the branch, the short commit hash, how many files changed and how many lines were added and removed. The commit message is never read. A commit made from inside an agent’s shell is recorded with that agent as its source, and doesn’t count as a sign you were there.

To work out who wrote the added lines, the daemon reads the commit’s diff on your computer. It looks at code files only (lockfiles and minified bundles are skipped, and so are merges), hashes each added line of 12 characters or more with your key, and checks the hashes against the lines you typed in an editor with the extension. Only the two counts, typed_lines and agent_lines, are kept. The lines and their hashes stay on your computer.

Typing and presence

The daemon asks your operating system two questions every 5 seconds: which app owns the focused window, and how long ago the last keyboard or mouse input was.

If the focused app is on the list of agent apps (terminals, editors, and the Claude, OpenCode and Codex desktop apps) and you’ve given input recently, it records a user_active event, at most one every 15 seconds. It carries the app’s name from the fixed list and nothing more. When you leave the agent app it records focus_lost. Input in any other app is ignored, and that app’s name is thrown away without being stored. Input older than 20 seconds is never recorded, so time the daemon wasn’t running leaves no trace.

Hindsight doesn’t see which keys you pressed, the window’s title or what’s on your screen. Presence can’t be turned off, because without it nobody’s prompts would count. HINDSIGHT_AGENT_APPS (a comma-separated list of executable or app names) replaces the default list of apps. hindsight-daemon presence shows what it sees without recording any of it.

On Linux, what presence can know depends on your desktop. Where it can’t tell which app has focus, any input counts. Where it can’t tell how long you’ve been idle, nothing is recorded.

Only on your computer

Some things are kept in your local database or data folder and never uploaded.

  • Where each repo lives. The path to every project’s repo root, to run git and check kept code.
  • Hashes of the lines agents wrote. Each line of 12 characters or more that an agent’s edit added, keyed-hashed. After a week the daemon checks whether the line is still in the repo, and only the totals per project and hour are uploaded.
  • Hashes of the lines you typed. Kept for 60 days if no commit claims them.
  • Your hash key. A random 32-byte key created on first use. It’s why a hash can’t be guessed back into a prompt or a path.
  • Snapshot pictures and their salts. Until you verify or upload them.
  • Your sign-in key in device.json, and a local API token in local-token.
  • Your whole event history. Sign out and it stays.

hindsight-daemon status prints where your data folder is. Set HINDSIGHT_DATA_DIR to put it somewhere else.

Was this page helpful?