48 comments

[ 2.0 ms ] story [ 56.2 ms ] thread
A fun anecdote, and I assume it's tongue in cheek, although you never know these days, but is the LLM guaranteed to give you back an uncorrupted version of the file? A lossy version control system seems to me to be only marginally better than having no VCS at all.
Don't take this as career advice!

This is an amusing anecdote. But the only lesson to be learned is to commit early, commit often.

The lesson is to trust microsoft Recall.

"Hey copilot, what are all my passwords and credit card numbers"

Ok great, now u have retrieved that code that you dont even understand and is completely unmaintainable.
I cannot wrap my head around the anecdote that opens the article:

> Lately I’ve heard a lot of stories of AI accidentally deleting entire codebases or wiping production databases.

I simply... I cannot. Someone let a poorly understood AI connected to prod, and it ignored instructions, deleted the database, and tried to hide it. "I will never use this AI again", says this person, but I think he's not going far enough: he (the human) should be banned from production systems as well.

This is like giving full access to production to a new junior dev who barely understands best practices and is still in training. This junior dev is also an extraterrestrial with non-human, poorly understood psychology, selective amnesia and a tendency to hallucinate.

I mean... damn, is this the future of software? Have we lost our senses, and in our newfound vibe-coding passion forgotten all we knew about software engineering?

Please... stop... I'm not saying "no AI", I do use it. But good software practices remain as valid as ever, if not more!

I'm not sure it's the context window. Gemini cli keeps a shadow git repo to be able to rollback changes in cases like this: https://gemini-cli.xyz/docs/en/checkpointing.

It's disabled by default, but even with the default setups, you can find large snippets of code in ~/.gemini/tmp.

tl;dr: Gemini cli saves a lot of data outside the context window that enables rollback.

I'm sure other agents do the same, I only happen to know about Gemini because I've looked at the source code and was thinking of designing my own version of the shadow repo before I realized it already existed.

Who needs anything when you can keep everything in a 16 TBs txt file?
Lol. The context window is actually just a buffer in your client. The guy could probably simply scroll up...
I’m completely paranoid about claude messing with my .git folder so I push regularly
I'm waiting for the day someone builds a wrapper around LLM chats and uses it as a storage medium. It's already been done for GitHub, YouTube videos and Minecraft.
(comment deleted)
If you sent the python file to Gemini, wouldn't it be in your database for the chat? I don't think relying on uncertain context window is even needed here!

A big goal while developing Yggdrasil was for it to act as long term documentation for scenarios like you describe!

As LLM use increases, I imagine each dev generating so much more data than before, our plans, considerations, knowledge have almost been moved partially into the LLM's we use!

You can check out my project on git, still in early and active development - https://github.com/zayr0-9/Yggdrasil

1M context is amazing, but even after 100k tokens Gemini 2.5 Pro is usually incapable of consistently reproducing 300 LOC file without changing something in process. And it actually take a lot of effort to make sure it do not touch files it not suppose to.
Intern I work with, got something working, but was not saved anywhere. No git No email to others in the project (That is how they work)

He complained to me that he "could not find it in ChatGPT history as well"

I think @alexmolas was lucky

I find git is just about the only thing you need to lock down when using AI. Don't let it mess with your git, but let it do whatever else it wants. Git is then a simple way to get a summary of what was edited.
I use Crystal which archives all my old claude code conversations, I've had to do this a few times when I threw out code that I later realized I needed.
If it’s in the context window … it’s sitting around as plain text. I guess asking is easier than scrollback?
This is something i'm currently working on as a commercial solution - the whole codebase sits in a special context window controlled by agents. No need for classic SCM.
It stands to reason the OP doesn't understand the code or what he's (probably the LLM) has written if he can't manage to reproduce his own results. We have all been there, but this kind of "try stuff" and "not understand the cause and effect" of your changes is a recipe for long-term disaster. Noticeably also is a lack of desire to understand what the actual change was, and reinforcement of bad development practices.
That’s a lot of words for “I suck at my job”
"Who needs git when [..]"

No matter how that sentence ends, I weep for our industry.

Our industry's version of Betteridge's law of headlines.
What does this have to do with 1M context windows… That’s just Cursor keeping your old file around.
I would recommend the Code Supernova model in Cursor if you want a 1M token context window. It's free right now since the model is being tested in stealth, but your data will be used by XAI or whoever it turns out the model creator is.
I had a similar anecdotal experience a few weeks ago.

I was working on a blog entry in a VS Code window and I hadn't yet saved it to disk. Then I accidentally hit the close-window keyboard shortcut... and it was gone. The "open last closed window" feature didn't recover it.

On a hunch, I ran some rg searches in my VS Code Library feature on fragments of text I could remember from what I had written... and it turned out there was a VS Code Copilot log file with a bunch of JSON in it that recorded a recent transaction with their backend - and contained the text I had lost.

I grabbed a copy of that file and ran it through my (vibe-coded) JSON string extraction tool https://tools.simonwillison.net/json-string-extractor to get my work back.

I would have pressed Ctrl-Z in my editor like mad until I got the file. If I was using vim I could even grep for it through my history files, thanks to vim-persisted-undo.