Should AI Coding Sessions Be Part of Your Git Commits?

A New Question for the AI Coding Era

The GitHub repository Memento earned 221 points on Hacker News by asking a deceptively simple question: if AI writes the code, should the AI session be part of the commit?

In traditional software development, commit messages record what changed, and comments or documentation explain why. But when AI tools generate significant portions of code, much of the context lives inside the AI conversation session — and then disappears.

What Gets Lost

When an AI session ends without being recorded, several valuable artifacts are lost:

Which prompts produced which code

What trade-offs were discussed with the AI

Which alternatives were considered and rejected

The reasoning chain that led to a particular implementation

For future developers — or even the same developer months later — this missing context can make AI-generated code harder to maintain and reason about than hand-written code.

What Memento Proposes

Memento provides a mechanism to capture AI coding sessions and link them to Git commits. This creates a traceable record from the original intent and dialogue through to the final code, enabling true code archaeology in the age of AI assistants.

Community Debate

The Hacker News discussion revealed strong opinions on both sides. Proponents argue that session logs are essential for understanding AI-generated code. Critics raise concerns about repository bloat, privacy implications of storing AI conversations, and whether this shifts too much complexity onto developers. The debate reflects a deeper question: how must version control evolve as vibe coding becomes the norm?