Live data from Hacker News

If AI writes code, should the session be part of the commit?

github.com

51–60 of 410 posts

Re: If AI writes code, should the session be part of the commit?

#51
I floated that idea a week ago: https://news.ycombinator.com/item?id=47096202, although I used the word "prompts" which users pointed out was obsolete. "Session" seems better for now.

The objections I heard, which seemed solid, are (1) there's no single input to the AI (i.e. no single session or prompt) from which such a project is generated,

(2) the back-and-forth between human and AI isn't exactly like working with a compiler (the loop of source code -> object code) - it's also like a conversation between two engineers [1]. In the former case, you can make the source code into an artifact and treat that as "the project", but you can't really do that in the latter case, and

(3) even if you could, the resulting artifact would be so noisy and complicated that saving it as part of the project wouldn't add much value.

At the same time, people have been submitting so many Show HNs of generated projects, often with nothing more than a generated repo with a generated readme. We need a better way of processing these because treating them like old-fashioned Show HNs is overwhelming the system with noise right now [2].

I don't want to exclude these projects, because (1) some of them are good, (2) there's nothing wrong with more people being able to create and share things, (3) it's foolish to fight the future, and (4) there's no obvious way to exclude them anyhow.

But the status quo isn't great because these projects, at the moment, are mostly not that interesting. What's needed is some kind of support to make them more interesting.

So, community: what should we do?

[1] this point came from seldrige at https://news.ycombinator.com/item?id=47096903 and https://news.ycombinator.com/item?id=47108653.

YoumuChan makes a similar point at https://news.ycombinator.com/item?id=47213296, comparing it to Google search history. The analogy is different but the issue (signal/noise ratio) is the same.

[2] Is Show HN dead? No, but it's drowning - https://news.ycombinator.com/item?id=47045804 - Feb 2026 (422 comments)

Re: If AI writes code, should the session be part of the commit?

#53

Should my google search history be part of the commit? To that question my answer is no.

I was looking for an analogy and this is a good one. The noise to signal ratio seems so bad. You’d have to sift through every little “thought”. If I could record my thought stream would I add it to the commit? Hell no. Now, a summary of the reasoning, assumptions made and what alternatives were considered? Sure, that makes for a great message.

Heck no. I don't even read the vast majority of the cack that my AI spits out for my own prompts. Why would I inflict that on anyone else?

Re: If AI writes code, should the session be part of the commit?

#54
post #51

I floated that idea a week ago: https://news.ycombinator.com/item?id=47096202 , although I used the word "prompts" which users pointed out was obsolete. "Session" seems better for now. The objections I heard, which seemed solid, are (1) there's no single input to the AI (i.e. no single session or prompt) from which such a project is generated, (2) the back-and-forth between human and AI isn't exactly like working wit…

Plenty of commits link to mailing list discussions about the proposed change, maybe something like that, with an archive of LLM sessions?

Re: If AI writes code, should the session be part of the commit?

#55
post #14

Why should it be? The agent session is a messy intermediate output, not an artifact that should be part of the final product. If the "why" of a code change is important, have your agent write a commit message or a documentation file that is polished and intended for consumption.

post mortems / bug hunting -- pinpointing what part of the logic was to blame for a certain problem.

this is what granular commits are for, the kilobytes long log of claude running in circles over bullshit isn't going to help anyone

Re: If AI writes code, should the session be part of the commit?

#56
post #4

Earlier quoted context omitted.

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.

Sounds like we've got an Ape Coder here! https://rsaksida.com/blog/ape-coding/

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?

#57
nope. Someones going to leak important private data using something like this.

Consider:

"I got a bug report from this user:

... bunch of user PII ..."

The LLM will do the right thing with the code, the developer reviewed the code and didn't see any mention of the original user or bug report data.

Now the notes thing they forgot about goes and makes this all public.

Re: If AI writes code, should the session be part of the commit?

#58
post #51

I floated that idea a week ago: https://news.ycombinator.com/item?id=47096202 , although I used the word "prompts" which users pointed out was obsolete. "Session" seems better for now. The objections I heard, which seemed solid, are (1) there's no single input to the AI (i.e. no single session or prompt) from which such a project is generated, (2) the back-and-forth between human and AI isn't exactly like working wit…

> (2) there's nothing wrong with more people being able to create and share things

There is very clearly many things wrong with this when the things being shown require very little skill or effort.

Re: If AI writes code, should the session be part of the commit?

#59
post #32
post #2

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.

> 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.

Not to mention AIs predilection for copious and overly abundant comments.

Re: If AI writes code, should the session be part of the commit?

#60
post #4

Earlier quoted context omitted.

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.

Your starting point is that people won’t read code, and you expect them to read someone’s llm session from git?

Another LLM will read it of course.
Post reply on HN