frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

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

https://github.com/mandel-macaque/memento
46•mandel_x•4h ago

Comments

mandel_x•4h ago
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.
latexr•3h ago
A better solution would be to read and understand the code before committing it.
mandel_x•3h ago
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.

kace91•2h ago
Your starting point is that people won’t read code, and you expect them to read someone’s llm session from git?
bonoboTP•25m ago
Another LLM will read it of course.
midnitewarrior•1h ago
Sounds like we've got an Ape Coder here!

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

dang•29m ago
Related ongoing thread:

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

add-sub-mul-div•1h ago
Personally, I'm not going to be complicit in reshaping the field around the lazy and undisciplined.
midnitewarrior•1h ago
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.

mandel_x•1h ago
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

midnitewarrior•16m ago
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.

denismi•1h ago
> 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.

rerdavies•26m ago
Not to mention AIs predilection for copious and overly abundant comments.
danhergir•3h ago
One of the use cases i see for this tool is helping companies to understand the output coming from the llm blackbox and the process which the employee took to complete a certain task
tartoran•1h ago
Why do that? Just let them deal with it.
rerdavies•14m ago
Except it doesn't capture the majority of uses of AI, in my experience. In my current practice, the the vast majority of AI use is autocompletions, or small inline prompts. ("Fix this error."; "Open an ALSA midi connection" (things that avoid a to trip into awful documentation); "if (one of the query parameters is "gear='ir') ..." (things that break flow by forcing a trip into excellent but overly verbose Javascript URL API documentation)). Only very occasionally will I prompt for a big chunk of code.
ares623•3h ago
Maybe Git isn't the right tool to track the sessions. Some kind of new Semi-Human Intelligence Tracking tool. It will need a clever and shorter name though.
nomel•2h ago
I don't think git is the right tool for much of modern software, where things like blobs aren't even properly supported.
jiveturkey•1h ago
How about Entire?

https://techcrunch.com/2026/02/10/former-github-ceo-raises-r...

https://news.ycombinator.com/item?id=46961345

MengerSponge•1h ago
I like to have a cup of coffee before my morning commit.

Germans are much more diligent about staging before they commit.

burntoutgray•2h ago
YES! The session becomes the source code.

Back in the dark ages, you'd "cc -s hello.c" to check the assembler source. With time we stopped doing that and hello.c became the originating artefact. On the same basis the session becomes the originating artefact.

sumeno•1h ago
cc was deterministic, you could be confident that the same code produced the same assembly each time you ran it

That is very much not the case with LLMs

ehnto•1h ago
LLMs are non-deterministic, you would end up with a different output even if you paste the same conversation in. Even if the model was identical at the time you tried to reproduce it. Which gets less likely as time passes.

Also, why would you need to reproduce it? You have the code. Almost any modification to said code would benefit from a fresh context and refined prompt.

An actual full context of a thinking agent is asinine, full of busy work, at best if you want to preserve the "reason" for the commits contents maybe you could summarise the context.

Other than that I see no reason to store the whole context per commit.

WD-42•1h ago
This is only true if a llm session would produce a deterministic output which is not the case. This whole “LLMs are the new compiler” argument doesn’t hold water.
bonoboTP•19m ago
"Deterministic" is not the issue either, it's that small changes of the input will cause unknown changes in the output. You might theoretically achieve determinism and reproducibility for the exact same input (seeding the random number generators etc.), but the issue is that even if you formulate your request just a little differently, by changing punctuation for example, you'll get an entirely different output.

With compilers, the rules are clear, e.g. if you replace variable names with different ones, the program will still do the same thing. If you add spaces in places where whitespace doesn't matter, like around operators, the resulting behavior will still be the same. You change one function's definition, it doesn't impact another function's definition. (I'm sure you can nitpick this with some edge case, but that's not the point, it overwhelmingly can be relied upon in this way in day to day work.)

lich_king•1h ago
I'm not sure this analogy holds, for two reasons. First, even in the best case, chain-of-thought transcripts don't reliably tell you what the agent is doing and why it's doing it. Second, if you're dealing with a malicious actor, the transcript may have no relation to the code they're submitting.

The reason you don't have to look at assembly is that the .c file is essentially a 100% reliable and unambiguous spec of how the assembly will look like, and you will be generating the assembly from that .c file as a part of the build process anyway. I don't see how this works here. It adds a lengthy artifact without lessening the need for a code review. It may be useful for investigations in enterprise settings, but in the OSS ecosystem?...

Also, people using AI coding tools to submit patches to open-source projects are weirdly hesitant to disclose that.

ramoz•2h ago
We think so as well with emphasis on "why" for commits (i.e. intent provenance of all decisions).

https://github.com/eqtylab/y just a prototype, built at codex hackathon

The barrier for entry is just including the complete sessions. It gets a little nuanced because of the sheer size and workflows around squash merging and what not, and deciding where you actually want to store the sessions. For instance, get notes is intuitive; however, there are complexities around it. Less elegant approach is just to take all sessions in separate branches.

Beyond this, you could have agents summarize an intuitive data structure as to why certain commits exist and how the code arrived there. I think this would be a general utility for human and AI code reviewers alike. That is what we built. Cost /utility need to make sense. Research needs to determine if this is all actually better than proper comments in code

rfw300•1h ago
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.
lacunary•1h ago
but that takes more tokens and time. if you just save the raw log, you can always do that later if you want to consume it. plus, having the full log allows asking many different questions later.
AndrewKemendo•1h ago
How’s it any different than a diff log?
xboxnolifes•1h ago
Better question: how is it in any way similar?
AndrewKemendo•55m ago
If you read the history of both and assuming that there’s good comments and documentation, it shows you the reasoning that went into the decision-making
aspenmartin•1h ago
post mortems / bug hunting -- pinpointing what part of the logic was to blame for a certain problem.
monster_truck•30m ago
this is what granular commits are for, the kilobytes long log of claude running in circles over bullshit isn't going to help anyone
sunir•24m ago
In my case I have set up the agent is the repo. The repo texts compose the agent’s memory. Changes to the repo require the agent to approve.

Repos also message each other and coordinate plans and changes with each other and make feature requests which the repo agent then manages.

So I keep the agents’ semantically compressed memories as part of the repo as well as the original transcripts because often they lose coherence and reviewing every user submitted prompt realigns the specs and stories and requirements.

jiveturkey•1h ago
https://entire.io thinks so
reg_dunlop•1h ago
Thank you! Was looking for this company. Founder was high up at GitHub. Really an interesting proposition
natex84•1h ago
If the model in use is managed by a 3rd party, can be updated at will, and also gives different output each time it is interacted with, what is the main benefit?

If I chat with an agent and give an initial prompt, and it gets "aspect A" (some arbitrary aspect of the expected code) wrong, I'll iterate to get "aspect A" corrected. Other aspects of the output may have exactly matched my (potentially unstated) expectation.

If I feed the initial prompt into the agent at some later date, should I expect exactly "aspect A" to be incorrect again? It seems more likely the result will be different, maybe with some other aspects being "unexpected". Maybe these new problems weren't even discussed in the initial archived chat log, since at that time they happened to be generated in a way in alignment with the original engineers expectation.

fragmede•1h ago
Because intent matters and 6 months or 3 years down the line and it's time to refactor, and the original human author is long gone, there's a difference if the prompt was "I need a login screen" vs "I need a login screen, it should support magic link login and nothing else".
superturkey650•1h ago
Isn’t that point of design docs and not the commit log?
bear3r•1h ago
reproducibility isn't really the goal imo. more like a decision audit trail -- same reason code comments have value even though you can't regenerate the code from them. six months later when you're debugging you want to know 'why did we choose this approach' not 'replay the exact conversation.'
travisgriggs•1h ago
In our (small) team, we’ve taken to documenting/disclosing what part(s) of the process an LLM tool played in the proposed changes. We’ve all agreed that we like this better, both as submitters and reviewers. And though we’ve discussed why, none of us has coined exactly WHY we like this model better.
spion•1h ago
A summary of the session should be part of the commit message.
YoumuChan•1h ago
Should my google search history be part of the commit? To that question my answer is no.
travisjungroth•1h ago
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.

rerdavies•33m ago
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?
daemonk•1h ago
I did this in the beginning and realized I never went back to it. I think we have to learn to embrace the chaos. We can try to place a couple of anchors in the search space by having Claude summarize the code base every once in a while, but I am not sure if even that is necessary. The code it writes is git versioned and is probably enough to go on.
xhcuvuvyc•3m ago
Just get it to write more comments about reasoning as you go.
hsuduebc2•1h ago
I must say that would certainly show some funny converstaions in a log.
rcy•1h ago
I haven't adopted this yet, but have a feeling that something like this is the right level of recording the llm contribution / session https://blog.bryanl.dev/posts/change-intent-records
4b11b4•57m ago
I like it, but it seemed test could capture some of these "behaviors". But having it in a single document is helpful for context
causal•1h ago
If a car is used to get you somewhere, should you put the exhaust in bags to bring with you?
mannanj•1h ago
Is session context car exhaust? Or is it the Event logs and code of the CPU/car's brains?
cyberax•1h ago
We use flight data recorders on airplanes, though.
foamzou•1h ago
No. Prompt-like document is enough. (e.g. skills, AGENTS.md)
daxfohl•1h ago
I think so. If nothing else, when you deploy and see a bug, you can have a script that revives the LLMs of the last N commits and ask "would your change have caused this?" Probably wouldn't work or be any more efficient than a new debugging agent most of the time, but it might sometimes and you'd have a fix PR ready before you even answered the pager. And it's cheap, so why not.

Maybe not a permanent part of the commit, but something stored on the side for a few weeks at a time. Or even permanently, it could be useful to go back and ask, "why did you do it that way?", and realize that the reason is no longer relevant and you can simplify the design without worrying you're breaking something.

lsc4719•1h ago
Proof sketch is not proof
abustamam•1h ago
I don't think it should be. I think a distilled summary of what the agent did should be committed. This requires some dev discipline. But for example:

Make a button that does X when clicked.

Agent makes the button.

I tell it to make the button red.

Agent makes it red.

I test it, it is missing an edge case. I tell it to fix it.

It fixes it.

I don't like where the button is. I tell it to put it in the sidebar.

It does that.

I can go on and on. But we don't need to know all those intermediaries. We just need to know Red button that does X by Y mechanism is in the sidebar. Tests that include edge cases here. All tests passing. 2026-03-01

And that document is persisted.

If later, the button gets deleted or moved again or something, we can instruct the agent to say why. Button deleted because not used and was noisy. 2026-03-02

This can be made trivial via skills, but I find it a good way to understand a bit more deeply than commit messages would allow me to do.

Of course, we can also just write (or instruct agents to write) better PRs but AFAICT there's no easy way to know that the button came about or was deleted by which PR unless you spelunk in git blame.

dang•46m ago
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)

bandrami•32m ago
Plenty of commits link to mailing list discussions about the proposed change, maybe something like that, with an archive of LLM sessions?
acedTrex•27m ago
> (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.

dang•22m ago
That is by no means all of these projects. I'm not interested in a circle-the-wagons crackdown because it won't work (see "it's foolish to fight the future" above), and because we should be welcoming and educating new users in how to contribute substantively to HN.
sillysaurusx•24m ago
Unfortunately Codex doesn’t seem to be able to export the entire session as markdown, otherwise I’d suggest encouraging people to include that in their Show HNs. It’s kind of nuts that it’s so difficult to export what’s now a part of the engineering process.

I don’t have anything against vibe coded apps, but what makes them interesting is to see the vibe coding session and all the false starts along the way. You learn with them as they explore the problem space.

esperent•21m ago
I don't think it's hard to export, on the contrary its all already saved it your ~/.claude which so you could write up a tool to convert the data there to markdown.
dang•20m ago
mthurman pointed me to https://static.simonwillison.net/static/2025/claude-code-mic... - is that what you have in mind?
esperent•23m ago
> the resulting artifact would be so noisy and complicated that saving it as part of the project wouldn't really add that much value.

This is the major blocker for me. However, there might be value in saving a summary - basically the same as what you would get from taking meeting notes and then summarizing the important points.

killingtime74•8m ago
Also the models change all the time and are not deterministic
genghisjahn•34m ago
If you can, run several agents. They document their process. Trade offs considered, reasoning. Etc. it’s not a full log of the session but a reasonable history of how the code came to be. Commit it with the code. Namespace it however you want.
raggi•27m ago
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.

raincole•22m ago
I hope people start doing that. Not that it has any practical usage for the repo itself, but if everyone does that, it'd probably make it much easier for open weight models to catch up the proprietary ones. It'd be like a huge crowdsourced project to collect proprietary models' output for future training.
root_axis•18m ago
This seems wrong, like committing debug logs to the repo. There's also lots of research showing that models regularly produce incorrect trace tokens even with a correct solution, so there's questionable value even from a debugging perspective.
mock-possum•16m ago
I’ve had the same thought, but after playing around with it, it just seems like adding noise. I never find myself looking at generated code and wondering “what prompt lead to that?” There’s no point, I won’t get any kind of useful response - I’m better off talking to the developer who committed it, that’s how code review works.
what•9m ago
The developer that committed won’t know because they didn’t write it…

You can avoid the noise with git notes. Add the session as a note on the commit. No one has to read them if they’re not interested.

xhcuvuvyc•6m ago
No? For the same reason I don't want to work 8 hours a day with the boss looking over my shoulder.

WebMCP is available for early preview

https://developer.chrome.com/blog/webmcp-epp
197•andsoitis•6h ago•120 comments

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

https://github.com/mandel-macaque/memento
46•mandel_x•4h ago•77 comments

Show HN: Timber – Ollama for classical ML models, 336x faster than Python

https://github.com/kossisoroyce/timber
56•kossisoroyce•3h ago•7 comments

Little Free Library

https://littlefreelibrary.org/
86•TigerUniversity•6h ago•41 comments

Ghostty – Terminal Emulator

https://ghostty.org/docs
661•oli5679•16h ago•293 comments

Right-sizes LLM models to your system's RAM, CPU, and GPU

https://github.com/AlexsJones/llmfit
41•bilsbie•5h ago•5 comments

Tove Jansson's criticized illustrations of The Hobbit (2023)

https://tovejansson.com/hobbit-tolkien/
121•abelanger•2d ago•50 comments

Everett shuts down Flock camera network after judge rules footage public record

https://www.wltx.com/article/news/nation-world/281-53d8693e-77a4-42ad-86e4-3426a30d25ae
23•aranaur•24m ago•5 comments

Why does C have the best file API

https://maurycyz.com/misc/c_files/
83•maurycyz•9h ago•49 comments

When does MCP make sense vs CLI?

https://ejholmes.github.io/2026/02/28/mcp-is-dead-long-live-the-cli.html
313•ejholmes•11h ago•207 comments

Running Neural Amp Modeler on embedded hardware

https://www.tone3000.com/blog/running-nam-on-embedded-hardware
19•woodybury•2d ago•2 comments

Show HN: Vibe Code your 3D Models

https://github.com/ierror/synaps-cad
29•burrnii•2d ago•7 comments

C64 Copy Protection

https://www.commodoregames.net/copyprotection/
21•snvzz•3d ago•1 comments

What our DNA reveals about the sex life of Neanderthals

https://www.nytimes.com/2026/02/26/science/human-evolution-neanderthal-sex.html
31•Hooke•3d ago•27 comments

Decision trees – the unreasonable power of nested decision rules

https://mlu-explain.github.io/decision-tree/
424•mschnell•19h ago•72 comments

Next-gen spacecraft are overwhelming communication networks

https://atempleton.bearblog.dev/how-next-gen-spacecraft-are-overwhelming-our-communication-networks/
38•korrz•2d ago•10 comments

Long Range E-Bike (2021)

https://jacquesmattheij.com/long-range-ebike/
132•birdculture•3d ago•203 comments

Ape Coding [fiction]

https://rsaksida.com/blog/ape-coding/
152•rmsaksida•14h ago•94 comments

Show HN: I built a zero-browser, pure-JS typesetting engine for bit-perfect PDFs

https://github.com/cosmiciron/vmprint
4•cosmiciron•16h ago•1 comments

Why XML tags are so fundamental to Claude

https://glthr.com/XML-fundamental-to-Claude
178•glth•13h ago•123 comments

Microgpt explained interactively

https://growingswe.com/blog/microgpt
222•growingswe•18h ago•36 comments

Chorba: A novel CRC32 implementation (2024)

https://arxiv.org/abs/2412.16398
54•fnands•2d ago•15 comments

Setting up phones is a nightmare

https://joelchrono.xyz/blog/setting-up-phones-is-a-nightmare/
123•bariumbitmap•3d ago•152 comments

Flightradar24 for Ships

https://atlas.flexport.com/
205•chromy•17h ago•44 comments

Microgpt

http://karpathy.github.io/2026/02/12/microgpt/
1733•tambourine_man•1d ago•296 comments

You don't have to

https://www.scottsmitelli.com/articles/you-dont-have-to/
21•marginalia_nu•6h ago•15 comments

I built a demo of what AI chat will look like when it's “free” and ad-supported

https://99helpers.com/tools/ad-supported-chat
497•nickk81•16h ago•275 comments

Interview with Øyvind Kolås, GIMP developer (2017)

https://www.gimp.org/news/2026/02/22/%C3%B8yvind-kol%C3%A5s-interview-ww2017/
128•ibobev•3d ago•56 comments

Show HN: Logira – eBPF runtime auditing for AI agent runs

https://github.com/melonattacker/logira
8•melonattacker•5h ago•1 comments

Programming in K

https://github.com/JohnEarnest/ok/blob/gh-pages/docs/Programming.md
52•tosh•3d ago•9 comments