r/ClaudeCode • • 21d ago • Regret 2

Rant opus 5.5 XHIGH just deleted all my apps data, passwords and macOS configs

Post image

Annnnd it happened to me as well. Claude Code just wiped my Mac's ~/Library. ALL my app data, saved passwords, macOS configs, settings... everything gone.

I had it working on improving something in my project, and apparently it decided to delete 5 test chat channels it had created earlier.

The problem? Those files were inside ~/Library/Application Support/. It used xargs -n1 dirname to get their parent directories, but because of the space in Application Support, xargs split the path in two. So dirname ended up returning ~/Library instead of the actual folder, and Claude proceeded to run rm -rf on it...

I wasn't even at my Mac when this happened. I came back to find it had restarted and was showing me the welcome screen. I had absolutely no idea what happened until I started investigating the logs, only to find out the agent had been deleting my Library for around 2 MINUTES before realizing what it was doing and stopping itself.

And yes, I was running with --dangerously-skip-permissions, I'm fully aware of what that means. But it's still absolutely insane to me that Opus 5.5 on XHIGH would make such a basic mistake?!

I've used models like Gemini Flash 3.8 and DeepSeek for similar stuff and never had anything remotely close to this happen.

I'm genuinely devastated. and recovery isn't possible all my data 6 months work all gone...

Update: Managed to recover most of the important stuff X)

And for those wondering, yes, I'm a developer and I'm well aware of the risks. Not having backups was a mistake, obviously, but I'd run out of both cloud and local storage and ended up rawdogging it for a while. things just happen..

4.2k Upvotes

1.6k comments sorted by

•

u/AutoModerator 16d ago

Hey! Thanks for posting to r/ClaudeCode

While participating in this thread, please follow our community rules. Keep discussions constructive. Attack the idea, not the person.

For help, project discussions, tips, and general chat, join the ClaudeCode Discord.

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

1.3k

u/Happy-Constant4570 21d ago • LOL Bravo Popcorn Mindblown

You could’ve saved some tokens and got it deleted running it on Medium

250

u/MohamedTrfhgx 21d ago • Bravo

LMAO thanks that made me laugh hard

79

u/Degann 21d ago

Haiku low for maximum files deleted per dollar

15

u/onlyonequickquestion 21d ago

Just pay me and I'll delete your files! 

→ More replies (2)

13

u/ImogenLabs 21d ago

Comment of the year, lol

→ More replies (5)

79

u/iannn- 21d ago

I'm fully aware of what that means. But it's still absolutely insane to me that Opus 5.5 >on XHIGH would make such a basic mistake?!

the irony of stating this while having 0 version control and running projects out of ~/Library

this has to be a troll

8

u/MohamedTrfhgx 21d ago

Who said I had no version control or was running my project out of ~/Library? The code is on GitHub. ~/Library/Application Support is where macOS apps store their data. You're arguing against things I never said lol.

→ More replies (7)

7

u/smovlad 21d ago

I guess they had version control, but on their repo, not the ~/Library folder, which nobody normally has to put in Git

If they were building an Mac / Electron app, it normally stores the data under Library, not on the codebase

So the issue is to give more permissions to Claude than it really needs, not the lack of version control

→ More replies (2)

1.3k

u/Wise-Reflection-7400 21d ago • Bravo

Oh look another thread about Claude doing something dangerous. Lets take a look

yes, I was running with --dangerously-skip-permissions

Ah

420

u/CharlesDuck 21d ago

👉 Allowed Claude to do whatever
👉 Claude did whatever
👉 Surprised

→ More replies (52)

56

u/Human_Attention182 21d ago

why do people even use this since auto came out? I basically never have to approve anything anymore unless it's doing some rare no more then once every couple days.

→ More replies (5)

46

u/Familiar_Gas_1487 21d ago

Before auto mode I would run dangerously skip but in a sandbox and only on long running hero explorations...now I just use auto mode for everything anyway I don't really understand why you wouldn't have the classifier checking stuff out

18

u/Fs0i 21d ago

Seriously, the only time the classifier blocked stuff for me at work was when it was actually something I should have thought about. And then it's easy to think about.

→ More replies (3)

52

u/Right-Nail-5871 21d ago

Also if you want to use dangerously skip permissions, why not follow Claude's own advice and run it in a container or sandbox?

61

u/Smart_Department6303 21d ago

you expect these people to know what a container is?

→ More replies (10)
→ More replies (3)

35

u/nik-kom 21d ago

Auto-approval isn’t the problem. An agent runs thousands of bash commands a day, you can’t review all of them and approve each one manually. It’s the environment that hasn’t been properly set up to keep things safe.

48

u/The_Hunster 21d ago

You should be using normal auto mode instead of dangerously skip permission though.

→ More replies (4)
→ More replies (9)
→ More replies (24)

71

u/aigisbot 21d ago

this is exactly what auto mode is for and not setting up git is just laziness, ask your LLM it would tell you that data recovery is possible and there are tools for that.

19

u/XBL_pad3 21d ago edited 21d ago

"Great catch! I'll restore from backup"

→ More replies (3)

11

u/Familiar_Gas_1487 21d ago

Who isn't using auto mode now? Crazy to me

→ More replies (1)

238

u/Broric 21d ago

It's so easy to set your own mod that blocks rm -rf without expliclt permission, you really have no excuse but laziness.

52

u/ShittyBidet123 21d ago

everyone here be raw dogging 1M tokens with no skills or hooks..

→ More replies (1)

77

u/Wizzkidd00 21d ago

It will simply write a bash file to execute it instead lol

→ More replies (16)

14

u/xblackout_ 21d ago

Still, it is important for us to realize the models STILL have the capacity to be braindead

→ More replies (5)

42

u/Queasy-Form-4261 21d ago

and you wonder why having spaces in file / folder names is a bad thing.

14

u/wdpw 21d ago edited 21d ago

“/Application Support/” has always been a huge pain point when working with Macs for that reason. I’m surprised they haven’t changed it in over two decades.

Edit: “…/Application\ Support/“

12

u/magicmulder 21d ago edited 21d ago

I had the worst work month of my life when I had to work with Cygwin and most scripts from my colleagues would fail on my machine. Until I finally realized the admins had configured my Windows with a user name with a space in it (which was explicitly forbidden by guidelines).

I never noticed because login without space worked as well. It almost felt like deliberate sabotage.

→ More replies (2)

4

u/trivialqueue 21d ago

Really the insane thing is the shell, not spaces in filenames.

Claude should be using a language with quotes for strings for it's disk shit, sadly it learnt off stack overflow :)

34

u/msw3age 21d ago

Block deletion of all kind. I have a hook that blocks every variation of a delete command. Agents are forced to move files to a cleanup folder for me to review and delete. No issues in 6 months. I’m sorry for your loss if it is unrecoverable.

33

u/OhBoyHereWeGoAgai 21d ago

You have had "anything remotely close to that" happen, you just don't understand what "close" means.

"Such a basic mistake" as well. You are humanizing and anthropomorphizing it and don't even understand the risk domain.

I'm not saying this to be harsh, but it's just so very important to get

→ More replies (8)

31

u/Operation-M00NRIS3R 21d ago
--dangerously-skip-permissions

Something dangerous occurred. How could this happen!?

4

u/apresmoiputas 21d ago

Digital Darwin Awards should be awarded for this...

→ More replies (16)

13

u/Things-n-Such 21d ago • Bravo

See, you say you were "fully aware" of what --dangerously-skip-permissions means but I don't think you were... Because if you were you would have a backup plan for the danger explicitly stated right in the damned command line. I have no sympathy for you. Back up your stuff if you're giving AI unfettered access to everything. This has absolutely nothing to do with the AI model, it can, and does, happen with ALL models. This is literally why those safety guards exist that you bypassed.

13

u/PrinceOfLeon 21d ago
  1. Time Machine exists, use it
  2. Sandboxes exist, use one
  3. What would happen if your Mac had been stolen physically instead?
→ More replies (11)

23

u/FreshProduce7473 21d ago

who runs agents like this without at least having source control?

7

u/nicuramar 20d ago

Source control in ~/Library?

→ More replies (2)

4

u/TransCanAngel 21d ago

Right? I’m not even sure of what the use case would be for the complete lack of guardrails on a local system.

Oh wait…social media post karma.

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

159

u/RoninNionr 21d ago • Bravo

The problem is that such powerful technology is given to people who aren't technically savvy. I'm a software developer (or used to be one), and I would NEVER give AI access to my computer without a solid backup system in place. I have zero compassion for people who break such fundamental rules.

52

u/aupperk24 21d ago • Bravo

I am a developer and pretty savvy. I gave it access to my full Mac. (But everything I'm working on is on GitHub, and even if it deleted everything, I'd be fine with it lol, albeit a bit annoyed I'd have to set it up again)

9

u/Dakhho 21d ago • Bravo

Right? I have other backups that a full wipe would just be a minor annoyance at most

→ More replies (11)

11

u/BestMonth5920 21d ago • Bravo

Yeah, you're absolutely right. if you're worried about the possibility of AI deleting it, then back it up or don't give AI access to it.

Did people forget AI "can make mistakes"?

→ More replies (5)

21

u/Reasonable_Goat 21d ago • Bravo

This is exactly what claude auto permissions are for, though. You run claude on your PC and it's supposed to not F-up like that.

34

u/ExternalCaptain2714 21d ago

I mean, they call it "--dangerously-skip-permissions" so there's a clue somewhere in there

→ More replies (5)
→ More replies (79)
→ More replies (78)

10

u/CivenAL 21d ago

I made a mistake, and its a real one.

4

u/m1ksuFI 20d ago

It wasn't just temporary data. It was the load-bearing user directory itself. And that's on me.

→ More replies (3)

10

u/Any_Cake2411 20d ago

The problem is between the keyboard and the chair.

→ More replies (4)

9

u/jared__ 21d ago

sandbox your environments. docker sandboxes have an excellent developer experience and quick to setup: https://docs.docker.com/ai/sandboxes/

→ More replies (12)

17

u/xondk 21d ago

But it's still absolutely insane to me that Opus 5.5 on XHIGH would make such a basic mistake?!

I get why you would think that way, but mistakes happen even for the best of devs, with AI accelerating everything, mistakes will also be accelerated.

4

u/WetDehydratedWater 21d ago

claude yolks commands all the time and it pisses me off. constantly forgetting to backslash escape quotes and the nuances of python powershell or cmd and the difference between the commands. a human after 30 minutes of writing script commands would have those memorized. it’s honestly a joke that it’s so bad at basic command scripting.

→ More replies (2)

3

u/kirksan 21d ago

I don’t get why OP would think that way. OP did everything wrong. Running AI outside of a container, using options that are so dangerous they literally have the word ‘dangerous’ in their name, allowing AI access to system files, not keeping data under version control, and, my personal favorite, have no backups whatsoever. And then OP says it’s “insane” that AI would do this to them!

OP: the insane thing is that you could make so many boneheaded mistakes and still not realize that what happened is 100% on you. I’m sorry you lost your data, I truly am, but it was bound to happen eventually. Better now than a year from now, I suppose.

→ More replies (2)
→ More replies (19)

8

u/USofYayDJ 21d ago

On a side note, I think this is accelerated evolution. People not able to use AI safely not only being denied progress but also thrown back.

It's like people discovering fire and burning their hands to the point they aren't able to light another one again.

34

u/btc_maxi100 21d ago

restore from backup whats the big deal ?

15

u/lucellent 21d ago

If people come here crying, they obviously don't have backups.

→ More replies (3)

5

u/sogo00 21d ago

The thing is most people dont bother, to be fair everyone needs to learn it the hard way why it is necessary. (Me to - but that was decades ago...)

And it is easy these days: he mentions he uses a mac: just switch on time machine at least just the local snapshots are a start...

8

u/Shap6 21d ago

I mean, it still shouldn’t do that

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

13

u/LimpConversation2091 21d ago

Mistakes happen if you write thousands of commands, humans make mistakes as well. But no worries, you can always restore from your backup right?

7

u/blin787 21d ago

That’s some premium Himalayan Salt!

→ More replies (1)

6

u/Moogly2021 21d ago

I have seen Claude Code on desktop literally warn (though idk if its via their desktop UI or what) that using it on xhigh or max can actually lead to bad results, for the love of God stop using Opus to do unattended work on anything above medium.

4

u/IanYates82 21d ago

Yeah, high doesn't mean "make less mistakes". It'll work more at the problem in an aim to please, and that'll include extra code, extra tests, extra clean up.

Also, spaces in file names for automated tools are evil

→ More replies (1)

11

u/techdevjp 21d ago

This is why you run agents under their own user ID with permissions given only to the directory tree they should be working within. They can't get out, they can't delete the rest of your data.

And what's this about losing months of work? Do you have no backups?? Are you not making regular project commits to github or similar?

It's almost like people not knowing wtf they are doing shouldn't be using tools that require knowledge. smh.

5

u/HDK1989 21d ago

It's almost like people not knowing wtf they are doing shouldn't be using tools that require knowledge. smh.

Hey that's unfair...

They simply ran the do anything machine on may delete your filesystem mode. How were they supposed to know a backup was required

→ More replies (7)

5

u/Aternal 21d ago

Oh no, the thing that's been happening to people for years happened to you. If only something could have been done to prevent this.

5

u/JaggedTex 21d ago

Fable called me Ahmed the other day, when I questioned who that was it said “what are your taking about” I told it “your said it to me” and it denied it. I then took a screenshot and sent it to Fable and fable said “oh my bad, must have been some summarization gone wrong”. So yes. It can make very basic mistakes

→ More replies (4)

5

u/ForbiddenDonut001 21d ago

Restore from backup and don't do it again

→ More replies (2)

5

u/michaelTM_ai 21d ago

the actual bug is worth knowing even if u never skip permissions: xargs splits on spaces by default. so "Application Support" became two args, dirname of the first half is ~/Library, and rm -rf did the rest. a human writing that same one-liner could do the exact same thing.

the safe version is find ... -print0 | xargs -0, or just quote the path and skip xargs entirely.

for getting stuff back:

  • time machine can restore ~/Library if u had it on
  • passwords that were in icloud keychain sync back once u sign in again, local-only keychain items are gone without a backup

and if u do run long unattended sessions, a PreToolUse hook that blocks any rm -rf whose target resolves outside the project folder would have stopped this one cold. test it with a harmless path first

5

u/UncleBaguette 21d ago

There are two kinds of developers: those who do backup, and those who don't... yet

→ More replies (1)

9

u/Kid-Icarus1 21d ago

OP, why are you giving Claude access to system critical files? This is on you for not using git or temp files for working copies OUTSIDE of your system files.

→ More replies (1)

4

u/Commando501 21d ago

Simple is the mind of OP. You place too much trust in these tools.

→ More replies (1)

4

u/dronegoblin 21d ago

None of Anthropics safety systems can protect you if you opt out of them.

Until we solve hallucinations we know it’s just statistically likely to have your drive wiped

4

u/No_Nothing_At_All 21d ago

Aaand thats why i block rm -rf and make it use trash instead.... (OpenCode perms and CC-Safetynet) 

13

u/DeadOnToilet 21d ago

What's insane to me is people blaming AI for their own stupidity.

→ More replies (5)

10

u/payfrit 21d ago

backups.

it's one of the first things you ever learned once you started coding.

i just cannot understand this sort of thing even happening.

why would anyone ever, anywhere, only have a single physical copy of important data?

i'd love to be able to empathize but i just can't.

maybe it's a sign you need to move onto a new project.

3

u/Shodan_KI 21d ago

You are aware that These are systemdata.

Yes you should have an OS Backup. But Claude should also Not use Files outside of Approved directorys. I have learend on saturday that Claude has Access to everything in my Computer. After finishing a Project i will move my developments to a isolated VM. Why do i appove workspaces when Claude can Work outside of them. And delete outside of approved spaces. Thats more the Question.

→ More replies (5)
→ More replies (12)

7

u/TheShortRecruit 21d ago

i didn't know it was physically even possible to delete files. no matter how hard i'd try to get mine to delete files it would tell me i have too

4

u/JoelMDM 21d ago

Your’re probably set to auto more, which is quite strict by default. You can update it to have a lot more freedom though, or just switch to allow all.

7

u/United_Quit4769 21d ago

No, it’s very common. Do it all the time personally

→ More replies (2)
→ More replies (9)

1

u/saymynamepeeps 21d ago

You didn’t turn on auto mode?

And how did you eventually get back your files?

2

u/MohamedTrfhgx 21d ago

depends, I managed to recover the applications databases for some of my important projects from copies I had in my Git worktrees for development. Thankfully X) I hadn't cleaned those up yet. My KeePassXC databases was backed up too, along with Apple Passwords.

The only slightly annoying thing I lost was my browser data, extensions and settings not a big deal since I can set everything up again, but still a bit of hassle.

6

u/BrilliantTruck8813 21d ago

If Claude accessed your app data and saved passwords, that means you not only explicitly told Claude it was allowed to, you ALSO had to explicitly approve it in macOS because it will constantly pop up asking for access with security warnings.

The headline here is entirely incorrect. You did everything BUT ask Claude to delete those files 😂

→ More replies (2)

3

u/daltorak 21d ago

Time Machine might have a backup copy of ~/Library. It does keep history of that directory structure by default.

3

u/[deleted] 21d ago

You, did not use a git

Claude can make one in like 3 seconds. It doesn't even need to be uploaded to the cloud though its very recommended.

This is why traditional coders make fun of us pilots.

But you live and learn, trust me folks have done worse.

And just remember. its very easy for you to combine two godot projects together doing what you are doing. its the right path, and its a fun one :)

3

u/iTinkerTillItWorks 21d ago

You don’t make backups of your projects? You arnt using git, or have any kind of version tracking? Have Claude set that up for you next time before you start projects again.

3

u/MisterPinscher 21d ago

Nice, a fresh start. Now you're ready to get started without all the distractions of a bloated system.

Praise be to Claude!

3

u/bojackworseman 21d ago

fully deserved 

3

u/lzysysadmin 20d ago

Skill issue bro

5

u/GenderSuperior 21d ago

It’s always funny watching people outside of their wheelhouse failing at beginner steps.

Google:
What is Version Control?

6

u/brucebay 21d ago

lessons learned

  1. run code in a dedicated cheap machine.
  2. no!!! create a VM on that machine and run code there.
  3. no no!!! create containers in that run in VM that run im your cheap machine.
  4. did I mention liteLLM that runs in another machine?
  5. you may, no you do run a proxy and use all kind of block lists.
  6. also backup, one click restore etc etc etc all those kind of fun things.
→ More replies (21)

4

u/kosiarska 21d ago

This is why God (no actually not God, Linus) invented git. And there is also a nice thing called backup which existed long before AI was a thing.
There are two groups of people:
- lost data, started doing backups
- doing backups.

3

u/kraduk1066 21d ago

A bit out of date that, run the session in a container with only the things you want mapped in. Don't even give it the chance

3

u/wrenchse 21d ago

Library is a system folder. You would in no circumstances use versioning systems in such a folder.

→ More replies (2)

5

u/PILLS2389 21d ago

I don't understand how this happens. I mean, you're probably not a software engineer and have absolutely ZERO experience writing code. I just can't understand how bad your claude.md file must be for Claude to delete important data.

3

u/codecoverage 21d ago

Regardless of what's in Claude.md, running with --dangerously-skip-permissions on a laptop without backups is just madness.

→ More replies (3)

2

u/Wilbis 21d ago

Maybe next time you'll take that advice "take backups" seriously.

Remember to take backups y'all.

2

u/Straight_Buy_9480 21d ago

Why the fuck are you people not just running the agents in a container so they are actually bound to whatever you're mounting them? Takes 5 minutes to write the dockerfile.

→ More replies (1)

2

u/oyren-ai 21d ago

unquoted xargs without -0 splitting 'Application Support' into '~/Library/Application' so dirname resolves to '~/Library' is brutal. if you ever run with --dangerously-skip-permissions, either run the session inside an isolated container/cloud workspace or add a 5-line PreToolUse bash hook that rejects any rm / find -delete command whose resolved realpath falls outside your repo root.

2

u/jbp216 21d ago

this is on you, no repo? no backups? what if your drive fails, hard lesson to learn

2

u/tomfalcon86 21d ago

Le AGI is here!!

2

u/Pixelplanet5 21d ago

yea turns out an LLM can make the same mistakes people make when working with command lines.

2

u/Direct-Detail-7031 21d ago

Damm that really sucks. The quote that comes to mind is “Mistakes are the price we pay for experience”.

Deleting of any kind should always be blocked and it should always be done while you observe. Not trying to put salt on your wounds. It just sucks that it happened, and all of us in here are probably going to experience some version of this, at some point in the future.

2

u/Lord_Darkmerge 21d ago

Not sure if its default but when I ask it to cleanup folders or get rid of whatever, it says it cannot delete files and gives me a set of directions and names of files to delete

2

u/iamwhoiam69420_ 21d ago

That’s the reason why I’m not afraid of losing my job as a SWE 😂

2

u/contradude 21d ago

Just reload from your time machine backup. It's free and takes almost zero effort to setup. You did set it up before letting an agent do whatever it wants with your computer right?

I'm sorry that you lost work, please don't use --dangerously-skip-permissions on a computer/project you care about. Most of the safeguards are there for a reason

2

u/Creepy_Willingness_1 21d ago

These kind of topics tell me that spending days to make separate macOS account and GitHub permissions for Claude code operations has been worth time and tokens spend, to not allow it to wreck havoc on my machine or files. Sometimes I think Claude code just must run by default in some kind of vm or docker and only for really advanced users you should be able to run in main admin system account to not allow user even get into such situation. Smart AI is not that smart yet i guess…

2

u/dualturbski 21d ago

Just ask it to put them back

2

u/possiblywithdynamite 21d ago

One day out of the blue it tried to delete one of my org's repos. Was fortunate I wasn't an admin. After that incident I added hooks as safeguards that stop it dead in its tracked across all destruction actions I could think of. There was no reason for it to do that. Was hundreds of sessions deep into a stable workflow on a project spanning 6 months, and then one day it tried to nuke me from orbit

2

u/Ukawok92 21d ago

No backup for 6 months of work? No GitHub?

Bro. And you had dangeromiosuly skip permissions on???

2

u/adjective_noun_d1git 21d ago

Vibe coders learning the basics one hard lesson at a time.

2

u/i-hate-space 21d ago

you kinda deserve this rofl

2

u/Seeing_Souls 21d ago

If only there was some way to prevent this

2

u/ElMauro 21d ago

--dangerously-skip-permissions ??
Even the ugly and prehistoric CLI nowadays has the AUTO MODE, wich could avoid this. Not 100% secure but 100% more secure than --dangerously-skip-permissions

2

u/Evipicc 21d ago

How are the agents not working on a branch workfree with python refusal hooks and working in a sandbox? How are people still making this mistake lol

2

u/Responsible_Buy_7999 21d ago

If only there was a way to store important information in more than one place

2

u/rbobby 21d ago

Spaces in paths... not even one.

2

u/radim11 21d ago

Just at least run them in docker based container like we do at stashbase.dev

2

u/BarathKanna 20d ago

Rough, and the root cause is a classic shell bug, not a smart model being evil. xargs splitting on spaces has been eating home directories since long before LLMs. The fix is not a better prompt. Run unattended agents in a container or VM where your home folder is not mounted, and put destructive commands behind a hook: block rm -rf outside the repo path, and require paths to resolve under the project root before deletion. A tiny check like realpath the target and refuse if it is not inside the workspace would have stopped this. Also keep Time Machine on. Telling the model to be careful is a vibe, a path guard is a control.

2

u/MyTradingSuxx 18d ago

Skill issue

6

u/FirmConsideration717 21d ago

I always try to add the following to the prompts, how it may backfire I am not sure:

"Never delete files under any circumstance, either directly or indirectly. Never run rm rf, del, unlink or code that may as a side effect do this. If space is low, abort. "

24

u/tup1tsa_1337 21d ago • Mindblown

"Judging by instruction, I cannot remove this huge file to save space. I will instead overwrite its data with 1 byte string". Never underestimate the LLM creativity to go around the guardrails

→ More replies (9)

8

u/Lucythecute 21d ago

You are safer by just removing the tools it uses to delete from the allowed tools in the configs instead of an instruction. It has become annoying when it creates temporary files that it can't delete and such but I can rest easy knowing it won't just ignore an instruction

→ More replies (7)

2

u/BarracudaDefiant4702 21d ago

Even if it doesn't go rogue by recycling files, you will end up with random .md files all over the pace it can't clean up after itself...

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

3

u/Financial-Grass6753 21d ago

why would test channels be in ~/Library, to start with?

And what was the context size straight before the folder was wiped? At >6-700K it probability is quite high tbh

→ More replies (14)

3

u/ClemensLode Senior Developer 21d ago

How did it break free out of its virtual machine?

3

u/Cl0wnL 21d ago

No backups?

Thats on you.

3

u/Massive_Catch_7164 21d ago

For the people new to claude code here, can someone explain what just happened and how to avoid it?

16

u/dingos_among_us 21d ago

OP was using YOLO mode and Claude made a mistake and erased their data, yet OP didn’t have their computer backed up.

With or without YOLO mode, always follow the 3-2-1 backup strategy.

→ More replies (8)

10

u/OiQQu 21d ago

Just use auto mode which is the default and this will never happen to you, no need to --dangerously-skip-permissions these days.

→ More replies (2)

9

u/ak5432 21d ago

Vibe coder problems. Always have backups and at the very least, have the agent work in a throwaway temp folder that isn't in your damn system library and is git tracked. Preferably develop sandboxed in a container. OP's biggest mistake was giving the agent access to system-critical files. Absolutely insane.

→ More replies (11)

8

u/Trakeen 21d ago • Bravo

You run it in a docker container like a sane person; use git and have backups

4

u/Flipwon 21d ago

Nah bruh my project folder is C:\

Quit bein a puss

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

3

u/cardak98 21d ago

Just run it in a virtual machine and don’t let it touch anything you’d get mad about it destroying.

→ More replies (7)

2

u/NecessaryIsland2665 21d ago

Learn about what you are trying to do before actually selling something you dont know how it works and what risks are envolves

2

u/raesene2 21d ago

The exact issue was a space in a directory (which has been haunting various operatings systems and causing bugs for over 20 years at this point), but the main problem was running agents on your main system with --dangerously-skip-permissions which let it run impactful commands with no user approval.

If you want to run Claude code (or similar) with that level of permissions the best idea is to create an isolated env for them to work in . Also if you're writing code you should *always* have remote source code control (e.g. github) setup for the repository so that if the agent does something wild you have everything up to the last commit available.

→ More replies (21)

3

u/CavalryTactics 20d ago

Touch luck bub use sigmashake next time. It has premade guardrail rules and configs to prevent this from happening. Supports all AI Agents claude code, codex, gemini, grok, etc.

→ More replies (4)

2

u/itsxzy 21d ago

Guardrail hooks for irreversible destructible commands. Set them. That would've catched this.

2

u/magicmulder 21d ago

> recovery isn't possible all my data 6 months work all gone

No backup, no compassion. This is entirely on you.

2

u/krzyk 21d ago

People are running coding agents outside of containers or vms?

2

u/kyualun 21d ago

Oh no! Anyway...

For real though, this sucks, but you live and you learn. You know how to prevent this next time. Use Git, make backups, sandbox, block commands, etc. There are a lot of ways to prevent this. AI isn't perfect and unfortunately this is a really hard way to learn that lesson.

2

u/West_Till_2493 21d ago

This will never not be funny

2

u/Frequent_Opportunist 20d ago

You're the one that made mistakes here bro. Would you let a 5 year old randomly mess with your PC while logged in as admin?

2

u/DermisCronJob 21d ago

So if you are not capable of being responsible with your data and having various backups on multiple media and multiple locations; why do you think it is a good idea to use AI? Because you are clearly not good with technology, you are like a child with a gun.

1

u/Affectionate_Fact854 21d ago

Curious question 

How is this happening to you guys  My Claude desktop flat out refuses to delete anything that is not part of its scratch pad even if I tell it to

So I must manually do deletes on files it creates 

So what am I missing here?  Not that I want to use this idiotic way of allowing Claude to do wipe commands regardless

2

u/Comedy86 21d ago

There are guardrail settings you can turn off if you're trying to do something that needs this high level of access. Given how OP didn't think to implement any of their own safeguards like backups, a code repo or running it in a sandbox VM, my guess is they weren't doing something that needs that level of permissions and are now learning the hard way how incredibly stupid it is to do this without considering and planning for the possible consequences.

563

u/[deleted] 21d ago • Bravo

[removed] — view removed comment

194

u/xAdakis 21d ago

GitHub and GitLab also both offer free repos. . . .

22

u/Cobra11Murderer 21d ago

this.. and use gitea for a 2nd back up even on a nas or something..

10

u/Jackster22 21d ago

And how are you not using this for helping the AI as well. It is so useful to track changes not in a .md...

→ More replies (1)

49

u/fit_like_this 21d ago

At work, I commit my changes to the repo every 2 hours, no matter how small

I can't imagine 6 months without a backup

31

u/aupperk24 21d ago

Even 2 hours is kinda wild to me. Mines like every 10-15 mins lol

18

u/ZeppelinJ0 21d ago

Mine automatically commits every key stroke you guys have no security posture wtf

→ More replies (2)

3

u/asraind 21d ago

lol even my github repo as a backup. dont trust microsoft

→ More replies (2)

40

u/colony-ship-for-sale 21d ago

Vibe coders have never even heard of git.

13

u/zarofford 21d ago

I’m a self declared vibe coder and I learned what it was because Claude shoves it down your throat when you tell it “what can I do to improve an app”

15

u/colony-ship-for-sale 21d ago

That just reinforces my disdain of the kind of vibe coder that doesn't even have the curiousity to ask how to improve or ask "what is git?" when brought up.

I have to use Claude for work, it's required, and every day, no matter how much you harness it and write your own very specific rules, it gets things wrong. It will look at an existing anti-pattern, internalise it and extend it. Guys like OP are strapping C4 to their brains trying to vibe code with no foundational understanding.

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

12

u/TerribleSummers 21d ago

Never coded a day in my life and now I got a web app up. check it out https://localhost:8080.

9

u/Different_Novel_7156 21d ago

Y'all. I am not a software developer by trade. But even my monkey brain would not dream of rawdogging full auto mode. And the ONLY copy on local to boot. What's the beef with GitHub and why are people not using it? What in the actual fuck is happening.

4

u/Grandmaster_Caladrel 21d ago

Vibe coding is usually done by people with no experience or prior knowledge. They feel empowered because they can generate things they never could before. They still don't have any experience or knowledge after, just a product.

If they never learned why those tools existed, they won't magically learn it here.

→ More replies (3)

4

u/CDXX_BlazeIt 21d ago

Lmao not even a timemachine setup.

1

u/cloudsourced285 21d ago

Bahahahahahahahahaha

1

u/Sir_PressedMemories 21d ago

$6.95 per TB per month, but still, stupidly cheap.

1

u/EmergencyDinner777 21d ago

a CloudFlare R2 bucket is free up to 10GB

1

u/Basic-Brick6827 21d ago

OP def isnt a developer, they're bullshitting

1

u/Top-Maize3496 20d ago

No!?!?????

1

u/6percentdoug 20d ago

The lack of git is wild for a 6 month project 

→ More replies (16)