News for hackers. Stuff that matters.
Re:If AI writes code, should the session be part of the commit? by mandel_x on Sunday March 01, 2026 @07:27PM (#47212356)
I’ve been thinking about a simple problem: We’re increasingly merging AI-assisted code into production, but we rarely preserve the thing that actually produced it — the session. Six months later, when debugging or reviewing history, the only artifact left is the diff. So I built git-memento. It attaches AI session transcripts to commits using Git notes.
Re:If AI writes code, should the session be part of the commit? by latexr on Sunday March 01, 2026 @07:40PM (#47212444)
A better solution would be to read and understand the code before committing it.
Re:If AI writes code, should the session be part of the commit? by mandel_x on Sunday March 01, 2026 @07:44PM (#47212477)
People won’t do that, unfortunately. We are a dying breed (I hate it). I went against my own instincts and vibe code this, works as a proof of concept.

You can see the session (including my typos) and compare what was asked for and what you got.

Re:If AI writes code, should the session be part of the commit? by kace91 on Sunday March 01, 2026 @09:29PM (#47213160)
Your starting point is that people won’t read code, and you expect them to read someone’s llm session from git?
Re:If AI writes code, should the session be part of the commit? by bonoboTP on Sunday March 01, 2026 @11:05PM (#47213755)
Another LLM will read it of course.
Re:If AI writes code, should the session be part of the commit? by midnitewarrior on Sunday March 01, 2026 @09:34PM (#47213198)
Sounds like we've got an Ape Coder here!

https://rsaksida.com/blog/ape-coding/

Re:If AI writes code, should the session be part of the commit? by dang on Sunday March 01, 2026 @11:00PM (#47213727)
Related ongoing thread:

Ape Coding [fiction] - https://news.ycombinator.com/item?id=47206798 - March 2026 (93 comments)

Re:If AI writes code, should the session be part of the commit? by add-sub-mul-div on Sunday March 01, 2026 @09:37PM (#47213215)
Personally, I'm not going to be complicit in reshaping the field around the lazy and undisciplined.
Re:If AI writes code, should the session be part of the commit? by hrmtst93837 on Monday March 02, 2026 @03:25AM (#47215239)
Reading and understanding the code is essential, but in a collaborative environment, reviewing AI-generated code can be complex. It's about balancing trust in AI with the need for human oversight.
Re:If AI writes code, should the session be part of the commit? by midnitewarrior on Sunday March 01, 2026 @09:32PM (#47213187)
I already invented this in my head, thanks for not making me code it.

Excellent idea, I just wish GitHub would show notes. You also risk losing those notes if you rebase the commit they are attached to, so make sure you only attach the notes to a commit on main.

Re:If AI writes code, should the session be part of the commit? by mandel_x on Sunday March 01, 2026 @10:09PM (#47213404)
I added an action that will add a comment with the notes in GitHub so that you can see them directly.

I did work around squash to collect all sessions and concatenate them as a single one

Re:If AI writes code, should the session be part of the commit? by midnitewarrior on Sunday March 01, 2026 @11:13PM (#47213811)
Well done.

There is so much undefined in how agentic coding is going to mature. Something like what you're doing will need to be a part of it. Hopefully this makes some impressions and pushes things forward.

Re:If AI writes code, should the session be part of the commit? by denismi on Sunday March 01, 2026 @09:54PM (#47213318)
> the only artifact left is the diff

You also have code comments, docs in the repo, the commit message, the description and comments on the PR, the description and comments on your Issue tracker.

Providing context for a change is a solved problem, and there is relatively mature MCP for all common tooling.

Re:If AI writes code, should the session be part of the commit? by rerdavies on Sunday March 01, 2026 @11:03PM (#47213744)
Not to mention AIs predilection for copious and overly abundant comments.
Re:If AI writes code, should the session be part of the commit? by jwbron on Monday March 02, 2026 @12:23AM (#47214167)
The former GitHub CEO has a startup and this was their first release. They call it checkpoints: https://entire.io/

I copied it for my own tooling to make it work a bit better for my workflows.

Re:If AI writes code, should the session be part of the commit? by onel on Monday March 02, 2026 @05:29AM (#47216093)
Have you been using it? How useful do you find it?
Re:If AI writes code, should the session be part of the commit? by hrmtst93837 on Monday March 02, 2026 @02:53AM (#47215033)
Capturing the AI session is practical for maintaining context during reviews. It will help when tracing back through history after the fact.