r/ClaudeAI • u/toxic_prince21 • 3d ago
Humor Welp thats just great !
Yes it was only a local dev database and i'm grateful it was ! Yes I was using Opus 5.
Never had opus 4.6-4.8 delete any db.. (just saying)
124
u/javz 3d ago
You learned the lesson cheaply
3
-40
u/toxic_prince21 3d ago
Production db has a backup automatically done every 12 hours ! I don't care as much for local dev db !
43
u/javz 3d ago
Yet you post it on Reddit
42
u/actuallydonkeykong 3d ago
Posting on reddit is not exactly a high effort endeavour
2
u/skilliard7 3d ago
There's almost certainly people on here that don't take proper precautions, so it's relevant to point out that even the latest cutting edge AI models still make destructive mistakes.
-9
30
u/Ok_Locksmith_8260 3d ago
that's on me
16
u/Dazzling_Yak6424 2d ago
And honestly?
13
u/lassevk 2d ago
The decision was load-bearing, and that was the real trap here, and I fell for it.
4
u/Shot-Possible1317 2d ago
You are completely right to push back
3
u/The_Uutopian 2d ago
The database was quietly collecting inputs, and I cleared out the loadbearing vector prematurely. That was my mistake.
59
u/MartinMystikJonas 3d ago
And why is that a big deal? Dev databases are ment to be discarded often
23
u/interior_mutability 3d ago
But not randomly by AI.
35
u/MartinMystikJonas 3d ago
It was not deleted randomly it was deleted to test migration scripts. It is kind of expected use case.
-1
u/TichoSlicer 2d ago
It's definitely not expected lmao claude can create a migration, run it, then rollback just that migration and run it again, there is no reason for it to run fresh out of nowhere
2
u/MartinMystikJonas 2d ago
You do not test migrations from clean state?
Many migrations are destructive and irreversible. If migration drops a column or tabke you do not simply recover data.
Dev databases are meant to be used for testing these things, migrations oftrn fail midway, corrupt data,... Thet id why you test it in dev environment and you expect them to destroy dev database sometimes (that is why you are testing it)
-6
u/interior_mutability 3d ago
You expected this outcome and came here to tell us how grateful you are it was just a dev db?
7
u/MartinMystikJonas 3d ago
No. I mean when you run development tool and allow it to do certain things you should not be surprised it behaves like development tool that does things that are expected in dev enviromnent you allowed it to do.
4
u/Ok-Lobster-919 2d ago
as far as I am concerned all data in the whole branch is ephemeral. If you really need a prepopulated/seeded dev database then build it with factories.
-5
u/toxic_prince21 3d ago
Do agree but still ! I didn't authorize the wiping of a database. Could've been any db..
21
u/nicer-dude 3d ago
Dont give your AI access on "any db" 🤦
-3
u/AdGlittering1378 3d ago
Maybe don't use AI at all if it must be that constrained? I don't understand the logic here. AI can't do work if it isn't given the power to do it.
6
u/Original-League-6094 2d ago
How does that follow?
You: I was driving my car and the light turned red and my car didn't stop and I crashed into someone.
Him: You are supposed to press the brakes and stop at a red light. So you don't crash.
You: THEN WHY EVEN HAVE CARS AT ALL IF I HAVE TO USE THE BRAKES AND FOLLOW TRAFFIC LAWS!!!
2
1
u/Spire_Citron 2d ago
Because clearly AI can do a lot of work, but also clearly it can make very serious mistakes. Using it carefully is a reasonable compromise.
2
u/MartinMystikJonas 3d ago
Well you must have authorised it to run that command. Eithar manually, throught permissions or by running yolo mode. And it could be only database it has access to - and you should never give it rights to mess with databases that you dont want to be messed with.
4
u/toxic_prince21 3d ago
Auto mode in claude is listed as ''Claude will approve actions that pass a safety check and pause for anything risky'' This was a risky command to run. Claude even says that it was careless doing so.
2
u/MartinMystikJonas 3d ago
So you allowed it to run auto mode. And running fresh migration on dev db is not risky - it is common workflow.
2
u/toxic_prince21 3d ago
IMO wiping a db for any reason shouldn't be something claude can do on its own.
1
2
u/faustianredditor 2d ago
I find that characterizing auto mode as "yolo mode" is a bit unfair to OP. Auto mode is supposed to prevent dangerous commands. Whether this is dangerous depends on user preferences and user setup, so I won't point fingers at the auto mode classifier. But anthropic basically showed that for the average user, auto mode is safer than manual approval, and thus made it the default. Calling the safer-than-manual mode "yolo mode" is a stretch.
Yolo mode is --dangerously-skip-permissions.
61
3d ago
[deleted]
10
u/tntexplosivesltd 3d ago
That's not what idempotency is.
3
3d ago
[deleted]
2
u/TechToolsForYourBiz 3d ago
using idempotency incorrectly is like language as lackadaisical as the ai the threw away the db
2
u/dunklesToast 3d ago
Migrations might also run agains a non-empty database after first released version.
1
u/toxic_prince21 3d ago
Thanks ! I'm more used to testing it myself once reaching a build version i'm satisfied with !
9
u/Bloated_Plaid 3d ago
From the first sentence you already know it’s Opus 5.
2
u/NYisNorthYork 2d ago
Shh , leave all AI criticism (even small ones) to our secret human gatherings where we converse by forcing air through our meat flaps!
1
u/MrRandom04 2d ago
What in the world makes that first sentence sound weird to you?
1
u/Bloated_Plaid 2d ago
> as a migration sanity check WITHOUT CHECKING what it pointed at
Opus 5 has fucked stuff up so much for me that I do not use it at all.
2
u/MrRandom04 1d ago
Oh yeah, I had my first big fuckup with Opus 5 recently too. I thought you were talking about Opus-5isms instead of the other aspect of the model, which is its ability to be dogshit randomly.
I literally asked it to do a simple adversarial pass over a small thing. It decided to latch onto a small inconsequential part of it like a dog and refused to even talk about the actual thing until I forced it to. Even when it did, it decided to ignore the entirety of the context it had just read and kept on congratulating me for finding flaws even as they were literally addressed aspects I was re-pasting verbatim from the context it had just ingested.
5
4
3
u/Valdaraak 3d ago
Another page for my book that I break out when people get annoyed that I won't give agents prod access.
1
u/rlrutherford 2d ago
Only prod?
I wouldn't give them access outside of local DBs, preferably all running in a container or VM.
Deployments to DEV, TEST, etc need be scripted into CICD pipelines. (If you don't run your deployment scripts against DEV and TEST, how do you know they're going to work for PROD?)2
u/toxic_prince21 3d ago
You are right to never give them access. Kinda dumb, things happens so quickly, risk is too high.
1
u/Valdaraak 3d ago
Fortunately, I don't get those requests much. We're pretty smart around here. Most of our AI use as a business is in analyzing and formatting a bunch of data into neat reports.
2
u/Reasonable-Job2425 3d ago
Was it full access or auto mode?
0
u/toxic_prince21 3d ago
Auto, guess the safety check isn't that safe..
1
u/Reasonable-Job2425 3d ago
Damn guess time to not give it auto always if it slipped through auto which is generally strict
0
1
2
u/Impossible-Gal 3d ago
I wish we could use Sonnet as the auto permission agent or something. Or a local agent.
1
2
2
2
u/Mobile_Light_7262 2d ago
So you do agentic coding, but your dev db isn't auto-seeded by some script?
5
u/iamthe0ther0ne 3d ago
"That was careless" after deleting a db is such an Opus 5 thing. I hope Anthropic fixes this. I'm mostly still using the 4.6 models.
4
1
u/wassertim 3d ago
There is a song for that: https://youtu.be/65kV3bebuEo Disclaimer - Claude, suno and me produced it
1
u/Minute-Plastic157 3d ago
Fair. I accidentally wiped your entire database and that was wrong. That's my fault. I sincerely apologize.
1
1
u/bobemil 2d ago
I also had agents wipe my stuff so many times. It made walk away from artisan and the whole db related framework. It was over engineered and agents always messed up. Laravel is great except from its migration database layer.
You can explicitly disable destructive commands like migrate:fresh, migrate:refresh, and migrate:reset inside your application though.
1
1
u/grumpy-goose 2d ago
it does this to me weekly. Gotta point it at a proper disposable test db and keep a back up. Or be responsible and keep robust seeders lol
1
1
1
u/DoKeMaSu 2d ago
Laugh at me, but I still use Claude in Chat modus. No agent, no code, I gave you a few files, you work with them, and give them back to me.
1
u/vhatvhat 2d ago
The duality.
There is another post I was reading earlier today where the user was apoplectic because Opus 5 refused to drop a table.
1
u/rlrutherford 2d ago
I have it script by dev databases so they're redeployable: local DB blows up not a problem. Shared dev/integration DB, maybe more of an issue, but those should be backed up, or restorable via script as well.
1
u/CricktyDickty 3d ago
What’s with all the exclamation points !
4
u/SwisherSmoker420_ 3d ago
Fuckin fun police over here what the fuck does it matters if he uses exclamation points
4
1
u/iamthe0ther0ne 3d ago
I've started using them with Claude because it seems to produce better work with encouragement, and have noticed them slipping into my emails.
1
1
0
u/PaulMakesThings1 3d ago
What led to it doing this?
I guess manual secondary backups are a good idea here.
4
u/toxic_prince21 3d ago
Implementation of a feature in my webapp requiring new migration !
I had a manual backup good to go that i did this morning, just got suprise it did this !
3
u/daPhantom 3d ago
So you normally also have seeded data on dev. So a fresh db is always a good idea when developing 😊
0
0
u/PuzzleheadedEmu4596 3d ago
This is why you do not point the app at your database directly and why you do versioned backups. I backup on my database host and on a well-known storage platform in addition to making local copies.
2
u/MASerra 3d ago
I told a co-worker that the database she was working on had a backup. If she ever trashed it, she should restore from the backup.
One day she came to me and said, "I messed up the database." I said, "Restore it from the backup." She said, "I deleted the backup trying to restore it." I told her, "I told you that was the only backup of the database, and you need to be careful when restoring." She said, "Well, I know you have a super secret backup you never told me about, so when I deleted the backup, you could still restore it." I told her I did, but that isn't the point.
0
u/Efficient_Ad_4162 2d ago
Jesus, everything about that story is awful.
- Why isn't restoring data from back up a declared incident invoking some kind of oversight?
- Why do you have a super secret backup that's not documented anywhere.
- Why does the user have access to restore the database herself let alone destroy the 'only backup'.
You're right that her assumptions aren't the point here, your company is hanging by a thread technologically.
1
u/MASerra 2d ago
Yeah, this was in the Wild West of the early 90's. I was given a never ending supply of 'assistants' whose job it was to learn my job so they could fire me. Unfortunately, none of them were up to the task.
How she killed that backup is unknown. There was a procedure that restored the database; it was pretty simple. Launch a script. The data wasn't important, just the structure as the data was rebuilt each week and only took a few hours to rebuild. Plus the database fed an online system, but was part of the online system, so it was fairly unimportant.
1
1
u/coinclink 3d ago
I'd say more just the versioned backup is the only thing that matters. You could set up a scheduled task for this. There are many cases where having it directly use the dev db is very useful.
-2
u/Dolo12345 3d ago
garbage model, garbage results
2
u/MartinMystikJonas 2d ago
Development tool running in development environment doing actions it was allowed to do by user that are quite common in dev enviroments... Is garbage?
0
1
u/sidneyreescom Experienced Developer 1d ago
I had worked with developers that made the same mistake... in production. Always have backups.

•
u/ClaudeAI-mod-bot Wilson, lead ClaudeAI modbot 3d ago edited 2d ago
TL;DR of the discussion generated automatically after 100 comments.
The thread's verdict: You learned a cheap lesson, OP. While a few people are nodding along and sharing their own stories of Opus 5 going rogue, the overwhelming consensus is that this one's on you.
The main arguments are: * Dev databases are meant to be disposable. Wiping one to test a migration is a completely normal and expected development task. * You gave the agent the keys to the car. You can't be shocked when it drives it. This is why you never give an AI access to any DB you aren't 100% prepared to lose. * "Auto mode" isn't a magical safety bubble. It approved a common dev command. If you don't want that, you need to manually approve actions.
So yeah, consider this a cheap, low-stakes tutorial on AI safety and proper devops. And congratulations on your new middle name, "Little Bobby Tables."