There’s a question floating around dev circles that nobody has a clean answer to yet: when AI writes your code, should there be a record of that conversation baked into the commit? [Memento](https://github.com/mandel-macaque/memento), a new Git extension by Manuel de la Pena, takes a strong stance — yes, absolutely, and here’s how.
The idea is straightforward. You run `git memento commit -m “your message”` instead of a regular `git commit`, and Memento captures the AI session transcript, cleans it up into readable markdown, and attaches it to the commit as a Git note. Every commit gets an authorship log that maps line ranges back to the agent conversation that produced them. Your team can then look at any commit and know exactly which parts came from a human and which came from an AI assistant. It currently supports OpenAI’s Codex and Claude (set `MEMENTO_AI_PROVIDER=claude`), with room to add more providers.
What makes it practical is the collaboration story. There’s a `git memento share-notes` command that pushes notes to your remote so teammates can pull them down. There’s an audit mode (`git memento audit –range main..HEAD –strict`) for enforcing coverage. And there’s even a [GitHub Action](https://github.com/mandel-macaque/memento) that can either comment session notes on PRs or gate merges on note coverage — useful if your org wants to enforce transparency around AI-generated code.
This thing [blew up on Hacker News](https://news.ycombinator.com/item?id=47212355) under the title “If AI writes code, should the session be part of the commit?” — and the comment count (50+) outpacing the upvotes tells you everything about how divisive this topic is. Some folks love the audit trail angle, arguing it preserves the *why* behind code decisions long after the original dev moves on. Others push back hard, comparing it to publishing your Google search history — too much noise, too little signal, and real privacy concerns when sessions might contain sensitive business context.
Honestly, I think the truth is somewhere in the middle. Full session transcripts are probably overkill for most teams, but the metadata layer — knowing *that* AI was involved and *which* lines it touched — feels genuinely useful, especially as AI-written code becomes the norm rather than the exception. Memento is one of the first tools to actually ship something concrete in this space instead of just talking about it. Whether you agree with its approach or not, the conversation it’s forcing is one the industry needs to have.

Leave a comment