cd /news/ai-agents/git-blame-but-for-conversations · home › topics › ai-agents › article
[ARTICLE · art-172779] src=staycaffeinated.com ↗ pub= topic=ai-agents verified=true sentiment=↑ positive

Git Blame, but for Conversations

A developer released loch, an experimental open-source tool that hooks into Claude Code and records file changes per conversation turn, letting users run `loch blame <file>` to see which agent session produced each block of lines and `loch ask <file:line>` to fork and resume the original conversation with its full context. Conversations are compressed into a `.loch/` directory that can be synced to a shared S3 backend for teammates, and the author warns that secret-scrubbing from chat logs is not 100% successful, recommending against giving agents access to secrets. The tool currently supports only Claude Code, with other harnesses promised, and the author describes it as very experimental.

key takeaway

loch installs hooks into Claude Code to store per-turn conversations in `.loch/`, enabling `loch blame <file>` to map line ranges to the originating session and `loch ask <file:line>` to fork that session with its original context.

read3 min views4 publishedNov 19, 2026

the short story:

Last week I wrote a brief post about how the future of agentic editing is multiplayer. I believe in the same way that git allowed multiplayer editing before, we need to build a new primitive that syncs the conversations along with the file changes.

I have prototyped a tool (loch) which hooks into claude code (other harnesses coming soon) and tracks file changes per conversation turn. You can loch blame <file> to figure out which agent made a change, and loch ask <file:line> to resume the conversation that made the change.

In its current state it’s useful for:

In the future I intend to add:

the slightly less short story:

In the future is multiplayer I said we are going to be checking in our conversations.

More and more I find myself wishing I could just talk to the chat who made a change to figure out the context, to debug a new issue, or to continue a conversation when I have feedback in a pull request. So I built loch.

1. hook it up

loch install     # Installs hooks into claude code (other harnesses coming soon)
loch backfill    # Attempts to link previous chats based on all of your locally stored sessions

Conversations are stored and compressed into .loch/. They can be synced to a shared S3 backend if you’d like to share with teammates. WARNING: I try to clean secrets out of chat logs, but it’s obviously not 100% successful. I really recommend you just don’t give agents access to secrets.

From there, two basic primitives have been added on top:

2. blame a file

$ loch blame myfile.py
loch/format.py
        1-2  45b565e  Add loch format v1 and the Claude Code ingest converter
                      session 37d467e5 — asked: "I would prefer this tool to be agnostic of the editor that surrounds it…"
     19-100  6eb7b0d  Canonicalize per RFC 8785, fold agent events into facts
                      session 37d467e5 — asked: "honeslty none of those seem like open questions they all seem like you …"

Instead of just a commit and an author, every block of lines comes with the request that led to it. Typos included.

3. ask it (or resume a chat)

$ loch ask myfile.py:105 "why did you write this by hand instead of using json.dumps?"
forked session 37d467e5, which made 6eb7b0d, to its end: 765 records, as e87ec144-3a54-4d0e-8cd4-a30e2d2cc020

  ⋮ (the rest of the original conversation)

> why did you write this by hand instead of using json.dumps?

⏺ I wrote format.canonical by hand because json.dumps doesn't match RFC 8785: it
  prints floats in Python's exponent forms (1e-05 instead of 0.00001), sorts keys by
  code point instead of UTF-16 code units, and writes lone surrogates raw instead of
  escaping them, so a second implementation in another language couldn't reproduce
  the ids byte for byte.

It forks the original conversation (rather than resuming it) and will allow you to speak to an agent that has exactly the same context.

So far this is very experimental. I would love people’s thoughts on this direction.

── more in #ai-agents 4 stories · sorted by recency
── more on @loch 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
→ Live at https://your-agent.zahid.host ✓
Get free account → Pricing
from €0/mo · no card required
LIVE [news/git-blame-but-for-co…] indexed:0 read:3min 2026-11-19 · —