Three agents and two people work in one repository. git blame can only name whoever committed. DeepBlame names the agent, what it was asked for, and what it cost — and takes one agent's work back out without losing anyone else's.
Node 20+. Any git repository. Open source, nothing to sign up for.
$ deepblame blame src/upload.ts src/upload.ts 10 lines, 50% traced, 50% written by agents 1-4 you, or a tool nobody recorded 5-9 claude-code feb92f2 add a retry 90% changed elsewhere since, this line came through 10 you, or a tool nobody recorded
Records every coding agent you already use, and exchanges it in the format the agent vendors agreed on
A commit says a human made it. It cannot say which tool typed it, what it was asked to do, or what it read first. Every vendor keeps its own history, and none of them covers the others. DeepBlame keeps one record for all of them, in your own repository.
blame
A line is claimed only when it can be followed from the state the run left to the file as it stands now. Anything else is reported as unknown rather than guessed at. It survives edits elsewhere in the file, follows the file through renames, and keeps the line at a lower confidence when a formatter reindents everything — and says so.
See every command →$ deepblame blame src/upload.ts --why 7 line 7 of src/upload.ts written by claude-code claude-opus-4-5 run feb92f2 2026-09-27T09:14:02Z intent add a retry around the upload confidence 90% changed elsewhere since, this line came through the turn $0.0431, 6 tool calls
revert
An agent adds a retry loop to upload.ts. You rename the export in the same file. Revert takes the retry loop out and leaves your rename standing. A plain three-way merge cannot do that — two changes on adjacent lines conflict — because DeepBlame has something git does not: a record of which lines belong to the agent.
Nothing is written without --apply. A file that moved on too far is reported, not mangled.
$ deepblame revert --agent claude-code Undoing 1 run by claude-code ~/code/app ✓ src/upload.ts 3 lines comes out cleanly · src/index.ts 12 lines changed again after the agent Nothing has been written yet. Add --apply to undo 1 file.
cost
Read from the agent's own session log. Where the agent reports its own price, that figure is used instead of ours. A model with no known rate is left blank rather than guessed at — a missing number is honest, an invented one is not.
$ deepblame cost --days 7 7 days 38 runs, 1.2M tokens $84.15 by agent claude-code 31 runs $79.40 cursor 7 runs $4.75 by model claude-opus-4-5 31 runs $79.40 claude-haiku-4-5 7 runs $4.75
The ledger is a git ref, so sharing it is the thing git is already good at. Everything below reads the same record, on your machine or on your team's.
A mark down the left edge of every line an agent wrote, the agent and the prompt at the end of the line your cursor is on, and undo from the hover — after it shows you the plan.
The VS Code extension →6 if (!res.ok) { 7 │ await sleep(backoff); claude-code · add a retry 8 }
How much of a change an agent wrote, counting only the lines it touches. A drop-in Action posts it and replaces its own comment rather than piling up.
50% of this change was written by agents 14 of 28 lines claude-code 11 lines cursor 3 lines you 14 lines
Push your runs, pull everyone else's. Joining two ledgers cannot conflict by construction, and the file contents travel too — so blame and revert work on a colleague's agent from your own machine.
$ deepblame push Sent the ledger to origin. 12 runs, 3 came in first. $ deepblame pull 4 runs came in from origin.
Agent Trace is the interchange format Cursor published, with Anthropic, Cognition, Cloudflare, Vercel and Google behind it. DeepBlame writes it and reads it, which means attribution can move between tools instead of being locked to whichever one recorded it.
agent trace
A trace says which lines an agent wrote. It carries no before-image, so an imported line is blamed at 80% with the reporting tool named, and revert will not touch it — there is nothing to put back.
A claim is only taken in if git can still show the state it was made against: the revision it names, or a content hash that matches the lines in your file today. That second path is how a trace from a colleague's clone lands correctly with no shared history. Anything else is counted, reported and left out rather than guessed at.
$ deepblame trace import ./traces Took in 1 record from cursor $ deepblame blame app.ts 1-2 you, or a tool nobody recorded 3 cursor (reported) 9f874ac 80% another tool's trace says so; we did not watch it happen
One setup, then four commands answer nearly everything. No dashboard to learn, no account to make.
| deepblame init | Set up the ledger, local state and capture hooks |
| deepblame blame <file> | Which agent wrote each line, and how sure we are |
| deepblame revert | Undo one agent's work and nobody else's |
| deepblame cost | What the agents spent, by model and by agent |
| deepblame report | How much of a branch or pull request an agent wrote |
| deepblame push / pull | Share the ledger with your team |
| deepblame trace export | Write the ledger as Agent Trace, for any tool to read |
| deepblame trace import | Take in attribution another tool recorded |
| deepblame log / show | Every recorded run, and one run in full |
| deepblame doctor | Check recording is working, and say what to fix |
| deepblame gc | Age old file contents out of the ledger |
The ledger lives in a git ref in your own repository, refs/deepblame/ledger. It is never checked out, so your branches, working tree and index stay exactly as they were, and it is never signed with your key — a signing prompt can never block an agent. Prompts stay on your machine unless your team turns that on. There is no account, no server and no telemetry, and the whole thing is Apache-2.0 on GitHub.
One command. It sets up the ledger and wires up whichever agents your project already uses.