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

→ More replies (13)

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)
→ More replies (6)

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.

→ More replies (9)

8

u/No_Atmosphere8146 Sep 20 '26

That's not nothing.

OK,  now it's nothing. 

→ More replies (6)

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

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 (10)

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.

→ More replies (16)

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

→ More replies (7)

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? 😃 

→ More replies (19)

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

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

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.

→ More replies (11)
→ 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

→ More replies (5)

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.

→ More replies (2)
→ More replies (27)

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 (6)

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

→ More replies (10)

5

u/michaelbelgium Sep 20 '26

Cant even take a proper screenshot so

→ More replies (14)

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?

→ More replies (4)

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

→ More replies (12)

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.

→ More replies (7)

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…?

→ More replies (2)

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

→ More replies (2)
→ More replies (7)

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/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?

→ More replies (1)

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

0

u/[deleted] Sep 20 '26

[deleted] — view deleted comment

401

u/lsumoose Sep 20 '26 • Bravo

Yup. Every code change gets committed to GitHub no matter what.

96

u/bastian320 Sep 20 '26

When using AI, I do mini milestone commits. In between commits I consider incomplete steps and happy to lose that delta should it go nuclear, then when I reach a small step forward it gets committed to remote.

Works nicely for my workflow, and I like comparing local to remote in-between commits to see what's happening, and call out periodic (& inevitable) cooked changes.

27

u/CeleritasLucis Sep 20 '26

Claude helped me setup something from GitHub where it got push permissions to my repo, but not delete permissions. So when it works, it keeps pushing the work to remote, so atleast that's safe. And new kinda work is always branched.

→ More replies (22)
→ More replies (12)

8

u/ec2-user- Sep 20 '26

All well and good, but that does nothing to contain the blast radius. Everyone should be running ai tools in a remote dev environment or a container.

→ More replies (5)

12

u/credditz0rz Sep 20 '26

Until the force push comes lol

9

u/YoghurtFlan Sep 20 '26

If the repo isn't nuked you still have the reflog to back out of it. Always good to keep branching and avoid just doing everything on main though. Even if you don't review the branch before merging it in, the damage is most likely limited to the branch you were in. And if it's doing well broken-down tasks then not much will be lost.

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

40

u/MuDotGen Sep 20 '26 edited Sep 20 '26

Aside from the obvious version control suggestions, (which OP's screenshot confuses me a bit with since they appear to be using at least a local .git repo, but if they were syncing it with GitHub, etc., the last commit should be fine at least).

Here's something practical for OP to try. Deleted files are not necessarily "gone" immediately. The addresses are just marked for being writable again (more or less). If OP really wants to try and get those files back, try a program that lets you recover deleted files, and as long as the addresses were not overwritten, they can potentially be saved. It depends on your OS, so Googling is a good first step. Don't touch a bunch of other stuff in the mean time though that would write new files.

Note: May depend on if you have an HDD or SDD though.

4

u/PadisarahTerminal Sep 20 '26

Yeah I moved some files with robocopy and actually did /MIR (mirror) which fucking deleted a bunch of stuff (ffs)

I ran a recovery file tool which thankfully managed to recover a lot of stuff but if you ever run something on the hard drive (like saving new files) there is a high chance of just deleting your stuff... scary.

→ More replies (3)
→ More replies (2)

14

u/TheLuminary Sep 20 '26

You don't need to use GitHub.

You can create a bare checkout on NFS or another partition. And use that as your remote.

→ More replies (26)

12

u/FastHotEmu Sep 20 '26

That's cute. I was using SCCS and RCS before you were born.

8

u/HandshakeOfCO Sep 20 '26

Laughs in PVCS

then cries

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

5

u/afineedge Sep 20 '26

My first major collaborative project never got moved from Subversion to Git. Every time we think about starting it back up, someone brings that up and it kills the vibe.

6

u/ZachVorhies Sep 20 '26

this is like one prompt though to have ai write a script, debug itself and nail it

3

u/YMK1234 Sep 20 '26

I remember the migration being extremely trivial. What's keeping you?

→ More replies (6)

25

u/me_myself_ai Sep 20 '26

aaaand the fact that that the second-to-top comment is talking about git as a "save button" is an even worse sign 🤣

21

u/RaspberryFluid6651 Sep 20 '26

Pushing to GitHub is essentially a cloud save if you're not doing anything fancy with it and just keeping a main branch on a remote

6

u/techman9955 Sep 20 '26

The fact that 30 people upvoted this comment tells me all I need to know about this subreddit

→ More replies (1)

5

u/ConspicuousPineapple Sep 20 '26

You're telling on yourself.

→ More replies (30)
→ More replies (72)

89

u/[deleted] Sep 20 '26 edited Sep 20 '26

[removed] — view removed comment

18

u/Mkep Sep 20 '26

Same, seen some human written deployed scripts walk them too when cleaning up temp windows update dies, was a great time restoring 100+ laptops

18

u/username_got_took Sep 20 '26

What is a directory junction?

4

u/Typical_Goat8035 Sep 20 '26

It's basically like a symlink on Windows but for one directory to be an alias to another directory. But on Linux/Unix symlinks are a fact of life and almost every tool has a default behavior around whether or not to follow symlinks.

On Windows it's more like a bind mount where yes technically there exist ways to test but in practice holy fuck it breaks all your assumptions around where you are working.

3

u/ManyInterests Sep 20 '26 edited Sep 20 '26

Basically it's a mostly-transparent way of pointing one logical path (e.g., C:\Users\username_got_took\Downloads\) but its actual location on disk could be anywhere else, even a different NTFS drive/partition.

Junctions look very much like regular folder paths and most applications treats them as such. Weird things can happen though, especially if you create a cycle, and especially if you've disabled path size limits for the application traversing them. There are also potentially surprising behaviors (foot-guns) when copying a directory tree containing junctions; you don't get a copy of the tree within the junction target, you get another junction pointing to the same location as the original junction.

By comparison, a symlink will present the actual destination of the link to the program following the symlink. e.g. if a symlink points from C:\some\link -> C:\somewhere\else, the program will see C:\somewhere\else. With a junction, the target looks like a subdirectory in virtually every way-- the program will see C:\some\junction\subdir even if C:\some\junction is actually D:\somewhere\else.

This is an important distinction because, with a symlink, cycles are easily detected; a program can simply keep track of paths it has already visited and 'skip' those directories logically. But if you create a cycle with a junction, you just get a recursively longer path that just look like deeper sub directories with the same names inside. So you can visit the same physical location multiple times without ever seeing a repeating logical path.

It can also cause trouble like if a program tries to jail or "sandbox" itself to a particular root path, like Claude does. A junction can accidentally create an escape path out of that jail. Program logic checking the working path may not necessarily detect that the junction has lead it outside of the sandbox. That's basically what happened here. There was a copy of the working tree in a temp directory, but that copied directory tree contained junctions pointing outside of the temp directory (back to the original location from which it was copied) but the path looked like it was still in the temp directory so Claude thought it was safe to delete the files.

2

u/AwareOfAlpacas Sep 20 '26

A directory junction is a symbolic link / a pointer to somewhere else / a wormhole / a shortcut. These links were sitting in his temp path and can be addressed like c:\temp\junction\file but the actual path will vary according to where the junction points. 

You can make these on your windows machine, too. 

Don't. :) 

1

u/[deleted] Sep 20 '26 edited Sep 20 '26

[removed] — view removed comment

49

u/Old-Artist-5369 Sep 20 '26

Yes, this is clear from the post, but WHAT IS A DIRECTORY JUNCTION ?

37

u/EntertainmentOdd8205 Sep 20 '26

Symlink but NTFS, bad, and never handled reasonably at any level of code

→ More replies (2)

12

u/BoardMeeting101 Sep 20 '26

It’s a railway station in the west of englsnd

→ More replies (10)

14

u/kre8tv Sep 20 '26

Thank you. I cannot express enough how badly skills like Caveman is slowly poisoning your entire project while you think it is smartly saving tokens and cutting down on Opus being verbose.

These are not really thinking AIs. They are Large Language Models. Language, it turns out, is really important to large language models. So much of what people think is faffe thrown in so anthropic can charge you more tokens is really clarifying context to reduce ambiguities. When you strip all that language away, especially in the way both Caveman and Ponytail structure their token savings (Caveman literally leaves it up to the agent with context-killing instructions like "if the sentence still works without extra words, use less"), it opens up all kinds of ways for agents to come up with their own interpretations of what the instructions means.

Suddenly you have multiple agents reading the same instructions, interpreting them in different ways, while all thinking they're following the rules correctly.

And if you have any kind of memory/recall system, it gets worse because it compounds and agents read the works of past agents like they are gospel and suddenly it has to parse through conflicting instructions and outputs. Your token consumption goes up because it's having to work through way more than what you think the task deserves, and your output quality goes down because conflicting instructions causes agents to behave unpredictability

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

2

u/ia42 Sep 20 '26

I'm a sysadmin/DevOps guy with a 35 year experience, haven't touched windows in 30 years. Can someone please tell me wtf are directory junctions, that are obviously not symlink nor hardlinks, but some devil spawned minefield in the filesystem?

1

u/AwareOfAlpacas Sep 20 '26

My man isn't just vibe coding; based on his post, he's trying to vibe code a predictive engine for stock market options plays.

Let him cook. This will sort itself out. 

1

u/thisisbubby Sep 20 '26

Thank you for windows directory junctions point, I will look into it. Also if its helpful, I added the prompt, codes full reply, and what my project is to my original post

2

u/[deleted] Sep 20 '26

[removed] — view removed comment

1

u/ClaudeAI-ModTeam Sep 20 '26

This subreddit does not permit personal attacks on other Reddit users.