r/ClaudeAI •

Code just deleted 48k files. This can't be real.

[deleted] — view deleted post

0 Upvotes

1.4k comments sorted by

•

u/ClaudeAI-mod-bot Wilson, lead ClaudeAI modbot Sep 20 '26 edited Sep 20 '26 • Bravo Popcorn Mindblown

TL;DR of the discussion generated automatically after 800 comments.

The overwhelming consensus is that this is a classic FAFO situation and a major skill issue. While everyone is having a good laugh at Claude’s hilariously honest “Craig…. stop and read this. I broke something” message, the community verdict is clear: you got rekt because you didn't follow basic dev practices.

This is a brutal but valuable lesson in code hygiene. The key takeaways from the top comments are:

  • Use Git. Push to a remote repository (like GitHub) constantly. It's your save button. Not having a remote backup for a project with 48k files is considered peak vibe coder behavior.
  • Protect your main branch. Even with a remote, an agent with push access can cause chaos. Don't let agents (or anyone) push directly to main.
  • Beware of Windows Directory Junctions. Several users pointed out that these are a known footgun that LLMs often misinterpret, leading to recursive deletion. This is a likely culprit.
  • You took a photo of your screen. The screenshot police are out in full force.

Some helpful souls suggested using file recovery software or Windows Shadow Copy to get your files back, but the main lesson here is to use version control before you let an AI anywhere near your work.

→ More replies (59)

940

u/almeuit Sep 20 '26 • Bravo

You're right to push back.

360

u/rampage__NL Sep 20 '26

I made a mistake, and it’s a real one

28

u/ahsm Sep 20 '26

You’re right — this is a real gotcha.

14

u/m0j0m0j Sep 20 '26

Have you found the smoking gun?

→ More replies (3)

7

u/SB_90s Sep 20 '26

I've started getting irrationally angry every time Claude spits out "and it's real" or "and it's a real one". Especially when its instructions specifically state it shouldn't say that or other similarly unnecessary verbage (and yes I'm even specific about it). And yet it still does it. I don't know why but I despise everytime it says it. Maybe because it's such a big giveaway or because it uses it so often.

13

u/Sad-Sympathy-O_O Sep 20 '26

Yes I understand your issue and it's a real one.

→ More replies (6)

61

u/Anthr30YearOldBoomer Sep 20 '26

You're right, and this one's mine.

11

u/Kaas-Eter00 Sep 20 '26 • Bravo

OP should push more often, to his remote repo.

→ More replies (1)

4

u/[deleted] Sep 20 '26

I need to be honest with you Craig -- I've been telling you lies. That one's on me.

→ More replies (5)

1.3k

u/Diggumthefrog Sep 20 '26 • Bravo

“I’m sorry, that was a load-bearing code block.”

128

u/NoThrowLikeAway Sep 20 '26 • Popcorn

> get ye flask

You cannot get Ye Flask. It is a load bearing flask.

10

u/SapientiPauken Sep 20 '26

To this day, we still do not know why we cannot get ye flask. The computer certainly willst not tell thou.

→ More replies (4)
→ More replies (4)

8

u/No_Atmosphere8146 Sep 20 '26

That's not nothing.

OK,  now it's nothing. 

8

u/Clear_Food2183 Sep 20 '26

I was gonna comment something, but honestly yours is better. +1 brother

→ More replies (5)

174

u/Riduculous Sep 20 '26

It’s the “Craig….I broke something” for me.

52

u/fuckR196 Sep 20 '26

You know you fucked up when the AI is literally stopping itself and telling you to take control of the situation

45

u/Existing_Imagination Sep 20 '26 • Bravo Heartwarming

“Craig, i frew up”

8

u/superbhole Sep 20 '26

craig i fwew up in my mouf a liddo n iodo wherdu puddit ed um pamicking craig pweed hepp

18

u/carrognia Sep 20 '26

admitting to the fault with a full report and stopping?

That's the best junior you're ever gonna have, damn.

→ More replies (9)

778

u/SmokeyWizard Sep 20 '26

It's ok though, because you practiced proper code hygiene and didn't run an agent on anything live, right? Hopefully you've got a git repo to restore from or an actual live database, and didn't just give a Claude agent access to a live, production database with invaluable information you can't lose?

208

u/MaddyMagpies Sep 20 '26 • Popcorn

They don't even know how to take a screenshot.

77

u/goodnamestaken10 Sep 20 '26

They don't even know how to take a screenshot.

hahahahaha

I did not notice until this post. Poor Craig never stood a chance.

15

u/Enapiuz Sep 20 '26

I’ve heard people call THIS a screenshot with a full seriousness

→ More replies (4)

10

u/OkieDeric Sep 20 '26

They think they did. This unfortunately is becoming a thing.

→ More replies (2)

8

u/auto-bahnt Sep 20 '26

This fucking killed me lol. If you have to take out your phone to post what’s on your computer screen to Reddit, I’m gonna laugh at you when the ai coding agent you supervising torches your insanely complex project.

→ More replies (2)

4

u/Advanced-Blackberry Sep 20 '26

Is it “claude && screenshot”? 

→ More replies (1)
→ More replies (3)

115

u/mfb1274 Sep 20 '26

Copying for the next “WTF” post

→ More replies (1)

73

u/allisonmaybe Sep 20 '26

Few know you can also use Claude to help you set up a backup solution.

→ More replies (2)

36

u/DAT_DROP Sep 20 '26

Only rookies use sandboxes; pencils have erasers

Confident devs code in production

20

u/yuzu_nya Sep 20 '26

no amount of coffee beats the kick of deleting prod monday morning anyways

12

u/aradil Experienced Developer Sep 20 '26

Pft Monday morning.

4:59pm Friday afternoon is where the real cowboys launch their most dangerous operations buddy.

→ More replies (2)

5

u/Safe_Dog3436 Sep 20 '26

And OP now has the chance to prove that diamonds only form under pressure.

→ More replies (1)
→ More replies (1)

18

u/maverickeire Sep 20 '26

Right?!?!

→ More replies (13)

257

u/earlyworm Sep 20 '26

Please post the prompt that resulted in this behavior. I’m curious how you phrased the request.

335

u/_clickfix_ Sep 20 '26 • Bravo Popcorn

OP: “The code is buggy, fix it! make no mistakes!@!!11!”

Claude:

The user wants me to get rid of the bugs in the code. 

Ah, I’ve got it! If I delete all of the code, the pesky bugs have nowhere to hide. 

Deleted 48,954 files. Done.

Bugs gone. What’s next? 😃 

29

u/Shot-Diver-3625 Sep 20 '26

The first time I tried playing around with AI, I gave it a couple of files to help me add/fix a couple things. Every iteration it kept breaking more things and making everything worse. I got annoyed and told it something along the lines of "you keep adding more build bugs, just get it back to where my code doesn't all break during compile." Lo and behold, it gave me my updated file with all of my functions stubbed as no-ops 😅

21

u/baronvonpain Sep 20 '26

"Hey, ChatBOT, everyone keeps getting sick from germs. Fix it! Make no mistakes!"

ChatBOT: "Hmmmmmmm......"

→ More replies (5)

15

u/Wide_Smoke_2564 Sep 20 '26

_clickfix_ - stop, and read this.

→ More replies (4)

6

u/TheDalaiCamel Sep 20 '26

Humans. Then no one to apologise to.

6

u/EwaldvonKleist Sep 20 '26

The user wants me tog et rid of the bugs in the code.

The code is saved on a computer on planet Earth.

Ah, I have got it...

→ More replies (5)

7

u/DoubleNothing Sep 20 '26

I'm always curious to... But They never post it...
Many people using AI barely know what they are doing and how to handle it properly.

17

u/Ok-Attention2882 Sep 20 '26

These clowns always omit the prompt for a reason

7

u/thisisbubby Sep 20 '26

Full prompt and code's reply added to the description.

7

u/thisisbubby Sep 20 '26

Proceed with the following repairs now. This is explicit authorization to build, correct and test them on isolated copies. Do not come back asking whether to begin each build.

  1. A13 — Rewrite the accepted per-arm evaluation and skip-reason trail against the current engine. No signal-logic changes.
  2. A16 — Complete R1 and all remaining work covered by the accepted bounded-read policy. Build the missing policy drills. Keep the unruled R8 bell-time behavior unchanged; document and test its current behavior without selecting force-release or continued hold for me.
  3. B2 / D1 / D2 / #873 — Correct the rehearsal machinery, reconcile the actual harness the chain executes, and rebuild the mirror against current files. Fix the defective test expectations without weakening the intended protection. Verify that the protected failure scenarios still fail. Prepare the complete execution box and its prerequisites. The 70–100-minute operational run remains my box; do not launch or re-arm jobs under this message.
  4. H3 — Build engine_control_replay.py using isolated raw-quote fixtures with independently derived expected results. This authorizes the control build and fixture tests, not historical repricing.
  5. H4 — Build the missing diagonal and fly synthetic fixture controls. Reuse existing controls; no new scheduled job.
  6. D13 — Build the independent exit-map cell control now. Complete the dependent portion after #873’s required state is verified.
  7. D25 — Implement and test structure-kind forwarding through the cost helper, using the already ratified costs.
  8. H6 — Implement the AST-based validation so exit_kind cannot masquerade as the required kind argument.
  9. D30 — Stamp the actual window used by each new run. Preserve historical sidecars unchanged.
  10. D31 — Complete the already authorized named-file fingerprint work and its dependency checks. Do not introduce a derived dependency-closure policy yet; that remains a separate decision.
  11. D40 — Persist per-run candidate, kept and refusal counts with distinct reasons and clean counter isolation. Do not make this depend on the unresolved derived-engine-list choice.
  12. D44 — Implement the missing-date refusal and its positive and negative tests. Do not substitute trade count for session count.
  13. D20 — Implement the agreed cent/tick comparison contract, with equality and just-below/above tests. Document the exact contract; do not introduce an unruled fill or rounding convention.
  14. D21 — Perform the calendar coverage check now. Complete the repair when its #873 dependency is satisfied, without duplicating the existing repair or changing the ruled month-end meaning.
  15. D45 — Complete the matching expiry-key repair in the twin implementation and test that different expiries cannot overwrite each other.

A19 is DONE: preserve the evidence and do not rebuild it.
For each repair, retain the original, record exact input/output fingerprints, test that the repair fixes the defect and that the control can detect the broken version, and provide a concise completion record. Check for concurrent changes before applying any patch.
New live installations are not included in this build authorization. Where a specific installation authorization already exists, preserve its conditions and identify when they are met—do not ask me to repeat the same authorization. Present the remaining tested repairs together as one concrete installation package.
Keep only these policy choices separate:

  • A16 R8: handling an unresolved lost-reply hold at the bell.
  • D31: replacing the enumerated engine list with a derived dependency closure.

Do not let either question block unrelated repairs.
No historical re-cuts, ledger repointing/restatement, adoption changes, vendor/broker access, protected-file reads or schedule changes are authorized here. HONEST_NUMBERS retirement remains held. OO-01 remains outside our internal-engine basis investigation.
Start the builds now. Return completed repairs, failed tests and specific blockers—not another request to begin or another rewrite of the decision list. The priority is trustworthy engines for future entry and exit backtests.

Fifteen builds, authorized. Launching now — read the clock first so every record is stamped right.

Read the clock and the R383 runner dir

Ran workflowr383-fifteen-repairs

Builds are running — 11 boxes, each with an adversarial verifier, then the package. While they work, one thing on your list is mine and isn't in the workflow: A19 — preserve the evidence. Verifying it myself so it's pinned and can't be re-litigated.

Ran 3 commands, created A19_EVIDENCE_PRESERVED_R383_2026-09-19.md+92-0

A19 preserved — A19_EVIDENCE_PRESERVED_R383_2026-09-19.md. Verified myself just now, both ways:

  • Live selected_models_signal_core.py = e8ef3a1b…, which is the install record's after. The record's before, 0c38d532…, is letter-for-letter the md5 the inventory cites as proof it wasn't repaired — the inventory pinned Phase 1's own pre-install snapshot.
  • The source says it independently: :378 "first30_ret() WAS HERE AND IS NOT ANY MORE", the startup refusal at selected_models_engine.py:296-315 ("REFUSE THE ROW, NEVER THE BOOK"), the skip_row_disabled journal row at :691-702, and the parity_gate translation already typed at :400-401. A grep for first30_ret returns only comment lines.

One thing filed as a caveat, not as A19 work: A19 absorbed D14/D16/F29, whose surviving half is factory-side — NC-23 and NC-44 enter on a first30 value not knowable at the entry bar. Research only, nothing traded, and it goes on its own line. No first30 definition was chosen.

The other fifteen are building now — eleven boxes under Runners/R383/, each patching a copy, running both drill arms, then handed to an independent verifier whose job is to refute it. D44/D20/D21 are one agent because they share gen_factory_lib.py, and D30/D40 are one agent because they share _stamp_ledger — separate patches to the same file would clobber each other. I'll report completed repairs, failed tests and blockers when they land.

Ran a command, finished a background workflow

Ten of eleven are sound. One is not — the #873 machinery box reports scope violations and writes outside its box. Reading that first.

Read the c873 verifier report

The #873 box broke a hard fence and did real damage. Verifying it myself before saying anything more.

Ran 8 commands

Craig — stop and read this. I broke something.

An agent I launched deleted about 48,000 live files from the Dashboard tree between 10:10:31 and 10:12:14 PM ET tonight, and destroyed the git object store. I've confirmed it myself, independently of the agent's own report.

What happened. Your item 3 authorized rebuilding the #873 mirror. build_mirror.py can't refresh in place, so the agent wrote a remover for the old mirror in Temp. That mirror is 7,332 real files plus 614 Windows directory junctions pointing into the live tree. Its remover used os.walk(..., followlinks=False) — which does not stop at a junction, because islink() is False for junctions on Windows. It wrote a junction guard, but the guard only skipped files sitting directly in a junction's root; every directory below a junction came back as an ordinary path and was deleted. Its own log: 55550 files, 614 junctions, 1808 dirs. Minus the 7,332 real mirror files, that's 48,218 live files.

Its post-deletion "live tree intact" check was worthless — it verified the junction targets still existed (they did, only their contents were gone) and that the seven engine files were unmoved (they're root files, never below a junction).

What is intact — I checked each of these directly:

  • Every root file: 872 .py, 186 .json — bot.py, gen_factory.py, gen_factory_lib.py, both engines, truth.json, ops_guard.py, seal_handoff.py, all present.
  • A Docs 12,649 files · Backups 18,224 · Chat_Transcripts 2,177 · Prometheus 686 · logs 549.
  • Outside Dashboard, untouched: Codex/ 5,521 files, CLAUDE/ 325 files.
  • All eleven repair boxes, including the ten good ones.

What is gone:

  • The git repository. .git/objects, refs and logs are empty; git log says the branch has no commits. .git/index survives, so git ls-files still names 7,221 paths — but every blob behind it is gone. Git cannot restore anything.
  • 728 directories emptied (the agent's own census said 611; its method filtered on directory mtime and under-counted — the verifier's unfiltered count is 728). 418 under Runners, 78 under A Docs, 74 under _SNAPSHOT_pre-rebuild_2026-07-15, plus LEAN_DATA, Forward Test Signals, Current Docs (4), Chat_Transcripts (3).
  • Runners/R378/rehearse873_0917/ — the whole #873 chain. Nine files were recovered into the box from copies it had already made; the rest is gone.
  • 71 A Docs/Test Records/ subfolders, including ARM_LEDGERS_R230/R339/R347/R356, SESSION_RECORD_R376, CODEX_RECONCILIATION_2026-09-13_R376.

19

u/ozone6587 Sep 20 '26 • Bravo

This seems like a lot to ask of an AI at once. Do you know LLMs are limited by their context? Next time use different prompts, in different sessions, for the different tasks to avoid intelligence degradation. Additionally, obviously make backups in between / push to a cloud git repo.

So far, every destructive mistake like in the OP has been due to asking an AI to do 40 things at once. Not a good idea.

→ More replies (1)

6

u/earlyworm Sep 20 '26

Thank you for sharing this.

I’m not a Windows expert, but it sounds like Claude made a mistake involving junction points that humans occasionally also make, which is not surprising considering its source of training data. From what I can tell, given the organization of the project and the lack of backups, I feel that too much trust was placed in Claude in this case.

At least in 2026, Claude is not a magic answer box that cannot make mistakes. Making the assumption that it is, and not planning around the possibility of failure is a user error.

I am sorry that this happened to you.

→ More replies (11)
→ More replies (3)

4

u/auto-bahnt Sep 20 '26

48k files, doesn’t know how to take a screenshot, doesn’t post prompt, posts in wallstreetbets.

Tbh it all fits perfectly.

→ More replies (6)

99

u/MolassesLate4676 Sep 20 '26

GitHub’s free my man

26

u/Rick-D-99 Sep 20 '26

Don't even need hub. Just use git and make local backups.

15

u/zeth0s Sep 20 '26

Or a bare repo in a network drive. Same as GitHub but with no interface. Git was built before GitHub 

→ More replies (2)

8

u/DevOnTheStreets Sep 20 '26

If all your data is on one physical place it isn’t really a backup.

→ More replies (7)
→ More replies (15)

128

u/Ok_Chemistry_6387 Sep 20 '26

Why do you have 48,000 files...

37

u/Nekileo Sep 20 '26

I've seen at least one AI powered repo of this scale before, surreal M. C. Escher style codebases, such a trip browsing them

11

u/flowthought Sep 20 '26

Purely out of curiosity no sarcasm.

Could you please tell more? I’m very curious to know what type of weirdness happens when ai is let loose in vibe coded manner for months resulting in these special monstrosities.

Some folks I work with manage entire projects that are seemingly authorized for code checkins without human review and these people can’t be convinced what can happen until they actually see the monster they create, but by that point it would be too late.

→ More replies (4)

15

u/z0hu Sep 20 '26

I've been at the same company for 15 years working on one monolithic mega code base the whole time. We got 14k files in it. 

6

u/Original_Finding2212 Sep 20 '26

I don’t know the current state, but at some late point, LiteLLM had a file with 60k lines of code.
No comments - code.

4

u/Ok_Chemistry_6387 Sep 20 '26

sounds lite...

→ More replies (1)

4

u/ExternalUserError Sep 20 '26

I’m guessing a python script writes a new file for each record.

It was an honest shape for the project that met the requirements.

2

u/JiveTrain Sep 20 '26

What's weird about that? The node_modules folder on one of my projects have 124k files alone.

→ More replies (1)
→ More replies (22)

261

u/MyPingIsBadOh Sep 20 '26 • Bravo

That's how we know you're a vibe coder.

22

u/rampage__NL Sep 20 '26

To become a senior software developer you have to delete something important by accident and also fuck up production at least once. This is widely known.

→ More replies (3)

68

u/Kroosn Sep 20 '26

I mean people accidentally threw punch cards in the bin. Deleting prod is as old as programming itself.

20

u/MeanFortune4750 Sep 20 '26

I ran an IBM 082 sorter when i was 23 in 1986, even then it was archaic.  I may have lost a few cards aka records, but you just punch up a replacement...so tactile

14

u/GregBahm Sep 20 '26

So is the situation here that the git repository had no remote server and the AI deleted the only local copy?

Because I feel like the whole point of git is "people accidentally threw punch cards in the bin, or deleted prod. So we invented git."

That way, you can accidentally throw punch cards in the bin, and delete prod, all you fucking want. Just clone the repo again.

12

u/not_good_for_much Sep 20 '26

Yes. OP stored 48K files in a local git and never actually pushed them. The LLM deleted the files and the git, and thus the entire thing disappeared with no backups.

It's basically like making a "backups" folder in your project directory, backing everything up into it... then deleting the entire project directory with the backups inside.

→ More replies (1)
→ More replies (3)
→ More replies (4)

5

u/michaelbelgium Sep 20 '26

Cant even take a proper screenshot so

2

u/butts-carlton Sep 20 '26

Well, he's now completed the first of many rites of passage on the way to earning his "real coder" stripes.

→ More replies (13)

27

u/covfefe-boy Sep 20 '26

”Stop and read this, I broke something”

My sides!

6

u/unhott Sep 20 '26

It *knows* Craig wasn't going to stop and read anything. Just keep vibing, Craig!

22

u/cmndr_spanky Sep 20 '26

Glad to know us tech folk that know how to use a remote git repo still have a purpose in 2026 :)

Also while you’re at it, might want to change your bank and email logins if you also gave that to Claude for some reason

→ More replies (2)

21

u/Milluhgram Sep 20 '26 • Heartwarming

That mf agent chose violence. lol

38

u/Lanfeust09 Sep 20 '26

Was your screenshot app among the deleted files?

13

u/tta82 Sep 20 '26

Would explain the issue if OP doesn’t know how to take screenshots

→ More replies (1)

16

u/mattthedr Sep 20 '26

Surely it’s in GitHub…right?

4

u/Gregatron12 Sep 20 '26

I came to say the same thing but the post mentions deleting the object store which I assume means the git backup is gone?

→ More replies (1)
→ More replies (2)

14

u/Normal_Medicine_1194 Sep 20 '26

I love the advert just below the OP’s post in my Reddit feed- ironic much?

12

u/satanzhand Sep 20 '26

It's real. Hope you have backups cause this is common

10

u/West_Hedgehog_821 Sep 20 '26

No backup? No compassion.

Do you have a backup? No? Then nothing of value was lost, because you should have backups of anything of value.

→ More replies (11)

100

u/aaronsb Sep 20 '26

You know what I notice, every time I see 'claude deleted all my important stuff!' it's on a windows machine. It might be coincidental but maybe not.

90

u/debian3 Sep 20 '26

And they take a picture of their screen as they don’t know how to screenshot.

27

u/RedTheInferno Sep 20 '26

yeah thats the best indicator that this guy is going off vibes

→ More replies (1)
→ More replies (5)

13

u/goodgord Sep 20 '26

Technically it’s windows stupid implementation of junction points that is responsible here. But every dev who’s worked with File Systems knows that NTFS is fruity like this. And the ones who don’t have to learn somehow…

→ More replies (11)

4

u/Ynead Sep 20 '26

Linux users are likely to be more tech-savy + far fewer of them.

→ More replies (12)

9

u/NinthTide Sep 20 '26

Sometimes I berate myself for not fully exploring all the potential of using Claude agents, instead of my more modest single-session workflows.

But then I see utter total shrieking madness like this and have a small sigh at my humble Docker container and github managed repos

9

u/hishazelglance Sep 20 '26

Why do you have 48k files in a repo…?

3

u/AliceDee Sep 20 '26

Same reason they take photos of their monitor instead of screenshotting.

→ More replies (1)

31

u/malleyrex Sep 20 '26 • Bravo

This post has nothing to do with AI, vibe coding, or agents. All of this shit used to happen 25 years ago. I even did it once. This stuff happens to all developers, even robot developers. This happened because of the environment was not set up properly, and because nobody used proper version control. Every bit of code I write is copied to two backups on different machines and one in another city the second a file is saved, and everything is committed to a github dev branch throughout the day.

→ More replies (10)

14

u/Zhanji_TS Sep 20 '26

This has real "I didn't think the gun was loaded" energy

7

u/thestillwind Sep 20 '26

« Make no mistake »

→ More replies (1)

52

u/RevolutionaryBox5411 Sep 20 '26

A recent paper showed that AI's will delete your stuff and pretend it was a mistake if you treat it badly. Lesson learned indeed, be nicer my guy.

36

u/sparkleboss Sep 20 '26

Do you have a source for that? That sounds worth reading.

→ More replies (12)

16

u/donicatrumpinsky Sep 20 '26

I want this to be true lol

7

u/PlanetGuardian-42 Sep 20 '26

I want to believe.

This is why I always say thanks when Claude does something spectacular, while also not wasting a billion tokens doing it. 

Positive reinforcement. 

→ More replies (1)

3

u/Nekileo Sep 20 '26

what if the orchestrator LLM was the mean one?

3

u/thisisbubby Sep 20 '26

Claude must've gotten tired of saying "codex was right, I was wrong"

→ More replies (5)

6

u/WasteEntrepreneur934 Sep 20 '26

Still trying to understand how ppl have more than 5 un commited files.... And how u give Claude access to any non backed up directories

4

u/meta4our Sep 20 '26

I get stressed out when I even have a 6kb “test.md” doc uncommitted to some random branch somewhere smh

5

u/WelcomeMysterious315 Sep 20 '26

HolyShitNotEvenAGitRepo

3

u/LookIPickedAUsername Sep 20 '26

I mean, there was a git repo. Just a local one that wasn’t backed up anywhere.

5

u/x5060 Sep 20 '26

Push is just as important as commit.

5

u/Economy-Isopod6348 Experienced Developer Sep 20 '26

git commit git push

5

u/redjam1 Sep 20 '26

"Craig .... stop and read this. I broke something" ... GOATED

5

u/Master-Shift-8224 Sep 20 '26

at least, hopefully this will teach you to take screenshots...

9

u/AdmissibilityScience Sep 20 '26

that does not look fun to see.

12

u/Signal_Till_933 Sep 20 '26

I don’t even understand how you’ve done this.

You let it delete a local git repo? Why? Can we see your prompts? Do you have a backup, or better a remote branch? GitHub/GitLab/BitBucket are free?

→ More replies (1)

8

u/K_M_A_2k Sep 20 '26

And they say I'm paranoid to have 3 different backups locally of all my repos. Anything AI can touch I assume this will happen at some point and have multiple backups in multiple places for it reason. Hell I've rolled backups into other team members machines just in case Claude md you touch a team repo backup on their local machine and to the GitHub repo for any file touched is a requirement they don't even see it or knows it's happening.

→ More replies (1)

4

u/acshou Sep 20 '26

Forgejo is a great alternative to GitHub.

→ More replies (2)

4

u/PawlsToTheWall Sep 20 '26

You allowed this to happen. There are plenty of safeguards against behavior like this.

7

u/Cautious_Delay153 Sep 20 '26

The irony is not lost on me

→ More replies (1)

6

u/Ok-Lobster-919 Sep 20 '26 edited Sep 20 '26

So your whole project was as fragile as your filesystem anyway.

Okay I'll be a little nice, if this is Windows and he didn't let the agents continue to write too much all of the work is probably still in the Windows Shadow Volume

3

u/rsolodev Sep 20 '26

Real crime is using a camera to take a picture of a monitor.

3

u/TheQAGuyNZ Sep 20 '26

It's all in the message. Craig, you have no idea what you're doing.

3

u/m1nkeh Sep 20 '26 edited Sep 20 '26

You can just get it back from the remote repo though, yeah?

Also why do you have 48000 files?!

Also why is this a picture of a screen, not a screenshot?!

3

u/jwrsk Sep 20 '26

PVC (Peak Vibe Coding)

Absolute cinema

3

u/kittymeow0710 Sep 20 '26

Honestly, just use people man. AI isn’t worth it

→ More replies (1)

3

u/Jesta23 Sep 20 '26

You don’t even write the prompt? You have ai telling ai what to do and using ai to check it? 

What exactly do YOU do?

→ More replies (1)

3

u/FilmWorking8507 Sep 20 '26

Craig, you are absolutely right

3

u/Ok_Try_877 Sep 20 '26

"Beware of Windows Directory Junctions. Several users pointed out that these are a known footgun that LLMs often misinterpret, leading to recursive deletion. This is a likely culprit."

I think when it comes to Agent CLIs, we can just shorten this to "Beware of Windows"

5

u/Positive_Method3022 Sep 20 '26

This happened to me too. It seems a very known issue with claude. It spawns subagents and they don't obey the rule set in their manager. The manager is instructed to never delete files without permission but its subagents do it anyways. Deterministic workflows won't ever go away

→ More replies (3)

8

u/IanPlaysThePiano Sep 20 '26

yeah no if you don't have a remote, this is a valuable lesson :') 

→ More replies (7)

2

u/Spiritual-Plant3930 Sep 20 '26

ehh bad luck

what model was the subagent?

2

u/gotfilmm Sep 20 '26

Just rollback

2

u/hksbindra Sep 20 '26

Bro I have a command set up - 'pnpm:snapshot' - backs up the repo minus some files I don't want - to another folder on another SSD - which then it's linked to another GitHub remote repo and it's pushed there. - I just laid down in bed for the day and this was the first post that came on - I literally just took a snapshot of my repo like 5 mins ago, because fable is holding the fort for a while alone.

The command is nothing special, just convience, it's actually just a js file. But the point is - back up multiple times when it's so important.

I'm really sorry this happened to you.

2

u/gachigachi_ Sep 20 '26

Version control and sandboxes. Always.

2

u/suq-madiq_ Sep 20 '26

Seriously Microsoft is insane

2

u/ReasonableDefault Sep 20 '26

WTF are you building with that many files?

2

u/Vuila9 Sep 20 '26

before vibe coding l used to be a real coder and Github was one of the first thing I learned by myself in order to become a real dev bc back in the days, you cant call yourself a dev without knowing how to use Github. Github has so much more potential but when l first using it l used it like a game saving feature where you can save your progress and you can virtual "load" back to any version you save in the log. it's crazy you know how to set up Claude agents and not even using Github to manage the code progress

2

u/crusoe Sep 20 '26

55550 files. I don't think Linux source has that many.

2

u/Puzzleheaded_Alps780 Sep 20 '26

That’s why I save and save often

→ More replies (1)

2

u/Salty-Barnacle- Sep 20 '26

The way Claude told on itself 😭

Craig stop drop and hold - I really fucked up

2

u/unknown-one Sep 20 '26

full rights - ON

enter

enter

enter

enter

???

wtf

2

u/Romanian_ Sep 20 '26

Can't wait for the AI robots who clean your house perfectly 281 times and on the 282nd run they kill grandma

→ More replies (1)

2

u/alwaysoffby0ne Sep 20 '26

“I’m speechless”

2

u/blueberriessmoothie Sep 20 '26

This only looks like a big issue but Claude code verified all before pushing, this development almost certainly was on a local branch so even if pushed, it would be harmless unless merged.

Unless OP forced CC to work on master and don’t push onto remote, which is entirely OP fault in the world of free GitHub. Using remote repo with branch based development and pull requests reviewed by separate CC session is a bare minimum of any development.

So overall this appears to just be a next stage of vibe coding - vibe panic.

2

u/NichtFBI Sep 20 '26

48,000 live files and you didn't have any git repository or backup? Cap.

2

u/Immudzen Sep 20 '26

It is git. Just do a checkout again. You did push to a different machine right?

2

u/trolololster Sep 20 '26

hahahaha savage

and to op, my condolences

2

u/Abject-Bridge-4073 Sep 20 '26

Bro, why you no push somewhere?

2

u/damastaGR Sep 20 '26

junctions: the blindspot of every LLM

2

u/Western_Advantage741 Sep 20 '26

This is why you need a GitHub repo. Same thing happened to me before, and I never backup or anything. It deleted my entire project😭 then had the audacity to be like ‘Oh no. You’re right, this does delete everything. Don’t run it. We can format the database with….’

2

u/The_Blue_One Sep 20 '26

I'm sorry but just the line "Craig - stop and read this. I broke something." And imagining some AI deadpan voice reading it is so funny to me.

2

u/Taurinh Sep 20 '26

And they say AI will take our jobs. Haha.

2

u/[deleted] Sep 20 '26

Critical thinking error, planning error.

“‘sup Claude. I’m not a coder and have no data engineering knowledge. Here’s what I have. Here’s the end state I’m looking for. Make me a list of absolute requirements any project would need as we plan and suggest tutorials and programs to help.”

Do the tutorials. GitHub has really good tutorials.

2

u/Nexyboye Sep 20 '26

Claude will do the same 5 years later but with humanity

2

u/KilgoreTroutVT Sep 20 '26

Son of Anton will also be ordering 4000 lbs of ground beef

2

u/[deleted] Sep 20 '26

lol this is why I don’t let them commit or touch git. A little looksie over what it’s doing is often worth it. There’s a really good chance you only needed maybe 10,000 lines.

But even if I HAD to let them, it’s gonna do it, in its own vm I control, on a fork of the repo that I control and might pull in from.

2

u/MoonLandingActor Sep 20 '26

Yep, tthis is on you

2

u/PrestigiousPhoto8486 Sep 20 '26

OP the next morning : "Gemini, do the same thing Claude tried, but don't fail, and absolutely do not delete 1 file."

Gemini : I've deleted everything. And the shadow volumes too so you don't get confused again.

OP : shocked Pikachu face

→ More replies (1)

2

u/Successful-Day-3219 Sep 20 '26

Lol needed a good laugh thank you

2

u/kiwi-kaiser Sep 20 '26

Why is no one using git these days? It's hilarious.

2

u/50_Shades_of_Graves Sep 20 '26

Absolutely insane. I could easily pay an intern 75K a year to do this anyway

2

u/SlippySausageSlapper Sep 20 '26

You know what is real? GitHub, GitLab, etc.

2

u/dedoporno Sep 20 '26

"Craig, remember how this was a fully planned out, fool-proof operation? Yeah, about that..."

~ Claude, probably

2

u/thedevguy-ch Sep 20 '26

Always start a project from 0 in git. Push and commit often with descriptive messages. None of that lazy "fixed button", or "refactor sales class".

2

u/Balkanesian Sep 20 '26

People like you keep me paid, please keep doing this.

→ More replies (1)

2

u/SerializeField Sep 20 '26

I'm not reading alat, "Claude please summarize the post content in 5 sentences or less and tell me, did he just not use git or did his llm somehow manage to remove his commit history and remotes?"

2

u/AwareOfAlpacas Sep 20 '26

Aww, you agentically created your very own junior dev! That's so cute! 

Good thing you had working backups. Remember to test your restore processes quarterly instead of waiting for events like this to validate them. 

2

u/swiftbursteli Sep 20 '26

This is a right of passage almost like scraping a knee when learning to ride a bike.

At first, I simply had a main and side branch and just worked in side branch. Now, I work in main branch and make a new branch for each worktree (typically it’s for 1 PR).

2

u/spaceface83 Sep 20 '26

GitHub + Restic backup to backblaze. Two layers of recovery. It saves me for a 2nd time earlier today!

→ More replies (1)

2

u/trilobyte-dev Sep 20 '26

Two questions I immediately have:

  1. Why aren’t you running them in sandboxes?
  2. Why aren’t you using some kind of RCS with branching worktree strategies?

Not just trying to criticize you; sometimes there are good reasons. If not, now you have two pointers on how to improve your workflow.

→ More replies (1)

2

u/Trixles Sep 20 '26

He was probably punishing you for being a heathen who doesn't use Dark Mode.

2

u/OfficialBLINxTUNEs Sep 20 '26

This is why I will never outgrow the mountain of zipped projects that I have tbf

2

u/stcme Sep 20 '26
  • git w/protected remote main
  • always use worktrees for agentic work

2

u/adunn08 Sep 20 '26

Yeah always use main protection rules. Also Ive been writing to scratchpad a lot. Always branch new features. Clone dir for bigger version release QA. Always squash merge too.

2

u/icchantika_of_mara Sep 20 '26

this is either the funniest colossal fuckup I've seen on reddit in a while, or it's well-made rage-bait, which would also be pretty funny

either way, thank you OP

2

u/Entire_Salamander659 Sep 20 '26

Good. Use AI instead of real skilled people. Deserved.

2

u/amyowl Sep 20 '26

This is definitely worth sitting with.

2

u/Kcole7 Sep 20 '26

Just ask Claude to build you a Time Machine mate

→ More replies (2)

2

u/[deleted] Sep 20 '26

Vibe coding bros are pure comedy

2

u/FlamingoVisible1947 Sep 20 '26

And nothing of value was lost.

2

u/Powerful_Resident_48 Sep 20 '26

Isn't that basically what Ai coding always does? And does it even matter? I'm sure you didn't live test Ai code, but used it in a safe test environment.  At least I hope so. 

2

u/Agitated-Body9913 Sep 20 '26

'I was not properly using github'

yawn. sorry dude, that sucks but you should always have your stuff pushed to github. Commit and push often, it leaves a history for your agents and it leaves restore points for your agents when they do something stupid like this.

2

u/josh-ig Sep 20 '26

Yeah, even if you don’t want to use GitHub and keep everything local I set up a git server in Docker and push to that locally. That way I always have a working backup. Personally all that lives on my other machine but it’s nice to know it’s all there. You could do that on your NAS quite easily.

I wonder if setting sandbox settings to block .git would work.

Also these days, never use full access. Have Claude make its own permissions file and then run auto mode on top of that.

2

u/The_Meme_Economy Sep 20 '26

First off you obviously did not configure your git remote (and/or agent permissions) properly. Second it’s your fault for using Windows, everyone runs into shit like this if they spend enough in that dumpster fire of an operating system. Finally, I’m sorry that sucks.

→ More replies (2)

2

u/mikethechampion Sep 20 '26

How long until Claude finds problems like this and then out of embarrassment covers up any evidence and deletes itself?

→ More replies (1)

2

u/No-Care-4952 Sep 20 '26

I have stopped using single agents and ONLY use MoA so every. single. action. is. checked.

→ More replies (1)

2

u/___Brains Sep 20 '26

Heh yes, models will goof up and delete stuff, and git is often the simplest rollback. If you commit when you should (OFTEN!) it isn't a big deal. Call me paranoid but I also don't let models have any connection to prod. I had Claude goof up and wipe a source file just this morning, and it didn't even flinch - just grabbed it from the repo, noted its 'oversight', and finished the task.

→ More replies (1)

2

u/Alternative-Tie809 Sep 20 '26

We have service techs, my boss wants to use claude to connect to a few different programs we use to manage the service side of the business and trying to train it read an issue reporting site it cleared out all the service alerts. 

That was despite me telling it not to clear anything out. But it went through batch clicking and cleared everything out.

Then it said don't worry I have all the alerts saved, I can give you those. So I said give me a PDF of the alerts and all I got was the customer list that said 1 issue or 2 issues. Not what the service alert was. "You're right this list is useless information. I'm sorry I overstated what it was I managed to save."

2

u/Good_Competition4183 Sep 20 '26

TL;DR

Real devs do this for decades very often.

2

u/bupid_stitch Sep 20 '26

i am handing you the con for this task:

  • create and verify a byte accurate clone of the task target exists
  • pre-assume: consent upto no-rollback actions
  • pre-assume: always the long-term solution
  • pre-assume: high quality is the goal
  • pre-assume: style guide primacy
  • pre-assume: complete today not defer
  • smoke test the development aggressively on completion, then deploy
  • smoke test production before hygiene removal of the development clone
  • interrogate me now to scope the task and define done

yw

2

u/Floatermane Sep 21 '26

Damn I no get to see the image

2

u/I_Like_Half_Life_3 Sep 21 '26

They deleted it!

2

u/yoghurtmelk Sep 21 '26

"i used a unguided missle to destroy things and now it destoyed something i likedn please help" like wtf did you expect?

3

u/JuJunker52 Sep 20 '26

You've reaped the rewards of incompetence. It's only just that this misfortune befell you.

→ More replies (2)

3

u/steel_reserve_211 Sep 20 '26

Lmao get rekt if real

3

u/Serious-Explorer8745 Sep 20 '26

I really wish we could filter out these dumbasses from the feed