Four hours of work, one wrong folder.

The bug was me.

July 20, 20264 min read
Claude CodeGitWorkflowThings I Got Wrong

I spent a morning on EndlichSichtbar with Claude Code. Tenerife, on holiday, on the balcony, seven in the morning to one in the afternoon, coffee within reach the entire time. Edge functions, the admin dashboard, a stack of small fixes I'd been avoiding for weeks. Good session. Closed the laptop feeling like a genuinely competent adult.

Next morning, back on the same balcony, same coffee, considerably more enthusiasm than the situation turned out to deserve. Half an hour in, something was off. A fix I distinctly remembered writing wasn't there. Then another one.

Wrong folder.


How you do this to yourself

Two copies of the same project on my machine. One was the actual current code, which I'd downloaded myself and left sitting exactly where I'd left it, in my Downloads folder. The other was a backup I'd made a while back, in a folder that looked, to a woman on her second coffee, exactly as legitimate as the real one.

The first morning's work went into the current code. The second morning went into the backup, on files that had already been superseded, with the kind of confidence that only comes from not knowing yet that you're wrong. Then I pushed.

Nothing vanished, technically. It was just buried under an older version that I had personally and cheerfully put on top of it.


Whose fault it is, since we're being honest

Not Git's. Git did precisely what I asked.

Not the AI's. Claude Code read the files in front of it and worked on those files correctly, which is the whole job.

Mine. I had two versions of the truth, on a balcony in Tenerife, and no habit that made me check which one I was standing in.

Which, and I say this through slightly gritted teeth, is exactly the failure mode I care about in products. The system behaves correctly on wrong input and hands back a confident result. Nothing warns you, because from inside that folder everything looks completely consistent.

I write about this for a living, more or less. I then did it to myself on holiday, in the sun, second coffee in hand.


Also: this was my first real terminal session

Worth saying, because it explains a lot. Up to that point I'd mostly clicked around and hoped for the best. This was the first time I was actually living in a terminal.

My reaction to realising four hours of work had just been quietly buried was: never again. All caps. Several exclamation marks. Laptop very nearly closed for the rest of the holiday.

Two hours later, second coffee doing its work: fine. One more chance.

That one more chance is, as of today, the tool I use every single day. Claude Code has become something like my second husband. My buddy Claude.


The fix is embarrassingly small

First thing I type in any session now, before any actual task:

check the code and tell me whether this is current

Ten seconds. Checks the remote, compares the local commit, tells me if I'm behind. Last time it came straight back with: the local repo is not current, GitHub has a newer commit, shall I pull?

Yes. Always yes.


The bigger rule

I work across GitHub, Supabase and Vercel, then pull everything down to my laptop. Claude Code pushes from the terminal. Every so often I still nudge something directly in the Supabase dashboard, or fix a typo straight in GitHub's own editor. Several writers, one branch, what could possibly go wrong.

The rule now: whoever touched it last, everyone else pulls first. Nobody opens a folder and starts typing before checking.

Not clever. Just the thing that stops the balcony debacle I've described from happening twice.


Four hours isn't a catastrophe. It was expensive enough to make the habit stick, which is the cheapest version of that lesson I was ever realistically going to get. And if I never broke anything, I'd have nothing to write about, or a second husband made entirely of code.

This site uses PostHog analytics, including session recordings, to understand how it's used. That only turns on if you say yes. Privacy policy.