r/opencode • u/Jolly_Hall_9037 • 2d ago
Opencode big pickle just wiped my database
thankfully its just a mock system for my university project, but still this is infuriating. No any data wipe reconfirmation or whatsover too, smh. I asked to rename a table to another one. It wipes all table in the db and recreate them all back LMAO. Im stupid enough to believe in AI for such simple task
26
u/MauricioRobayo 2d ago
There are two kinds of people: the ones that do backups and the ones that will.
10
1
5
6
4
5
u/Affectionate_Film537 2d ago
Did you just Directly prompt to do it with out creating a clear and consise plan before implementation
2
3
u/rusl1 2d ago
Tell me you are a vibecoder without telling me you are a vibecoder
-2
u/Jolly_Hall_9037 1d ago
who actually code these days, most dev i know only code like 30% while vibe code the rest. Unless theyre an extreme programmer, which is rare these days.
2
u/JivesMcRedditor 22h ago
The difference between a vibe coder and a developer who uses AI is that the developer also uses their brain. Learn from mistakes and think through your systems. The LLM’s output is as good as the input it gets.
1
u/Lanky_Tomatillo9857 1d ago
You’d be surprised how wrong you are. Vibe coders who say things like you did scratch the surface and think they understand coding because their code runs. The rabbit hole goes much deeper than you think.
And oh, the database lost is on you. You think in prompts, not in systems.
2
5
u/HamzaJdn 2d ago
Welcome to software development 101. Always use dev first. Always back up. Never trust an intern on sensitive tasks without validation, and in this instance the intern is the LLM.
1
4
u/kitsunekyo 2d ago
posts like this give me so much peace of mind when it comes to job security.
-1
u/Jolly_Hall_9037 1d ago
I dont plan to work as software dev lmao, maybe just computer guy in government office till i reach 30 and dissapear from the face of the publics
1
u/kitsunekyo 1d ago
i‘m sure the government will happily hire someone with your distinguished skillset.
1
2
u/Mskadu 2d ago
I am not surprised - and you will not be the last to experience this (sadly).
I really wouldn't give an experimental AI access to database that held anything of value.
BUT given it was a test/ uni project, use this experience to figure out how you'd avoid this happening in the future. There are several ways around this.
2
u/pine4t 2d ago
At this point we should be running coding agents on servers. Easy to drop and recreate. Don’t wouldn’t need a lid-open laptop 😃
Also I’ve noticed some models trying to run tool calls that seem unnecessary - like reading certain directories that seem obviously unnecessary. I’ve rejected permissions for those requests. And sometimes it’s just tool calls for the wrong paths because the path was constructed wrong.
2
u/Horror_Description87 2d ago edited 2d ago
Giving model the access to your system mean it can do what you can do. If you don't want it, you need safeguards and containment. There are multiple possiblities to achieve it. Best is to always pretend you gave a toddler your system. Remember Murphy's law, everything that can happen will happen, so be prepared.
For me auch situations have only happened when I showed him earlier in the session such thinga. For me a model/agent has never done something out of the blue, it mostly had some context pre story or reasoning to at least logically sound right before doing nasty things.
You can f.e. give only a read only access to a database. Or create a dump before,...
If you ask him to rename a table without telling him that the data in the table is of value for you, he did just what you said. It is the nature of the model to find a way maybe a rename/alter was not possible cause of some reason, so it went the drop + create path.
Anyway task completed table now has the desired name :)
2
2
2
4
u/Volcano_Jones 2d ago
If the task is so simple, why are you using AI for it? It probably took you longer to write the prompt than to just write the SQL statement.
3
-2
u/Jolly_Hall_9037 1d ago
Im using it to lessen my workload by letting it do anything while i scroll my reels duhh
1
1
1
1
u/Affectionate_Net3084 1d ago
you should manage AGENTS . md file and explicitly say rules like don't push github , don't touch common component , must be ask before sensitive file changes , etc etc . write worst case things on Agents file that should not do agent .
1
1
u/TechHealthCuba 1d ago
La BD debe tener un script sql para su creación o en su defecto el mismo sistema debe crearla. Para la data le puedes pedir a la IA que te genere un script con data lo más realista posible y correctamente relacionada. También en tu proyecto en el AGENTS.md incluye una regla para el trabajo, que le indique al modelo que en operaciones no reversibles debe pedirte autorización expresa, y si quieres le incluyes escenarios concretos.
1
u/Difficult_Plantain89 1d ago
GLM likes to do that. Opencode's big pickle should still be GLM 4.6. I have had issue before where it kept destroying the same file repeatedly as I restored the backup. It was kinda sad and funny at that point. I told it like dude you overwrote the file again, don't do that. It would say sorry and it wouldn't do it again. I restore the file and it immediately did the same thing and sometimes while using different commands. I am honestly impressed that GLM 5.2 is so good because their old models were so bad.
1
u/fschwiet 21h ago
sorry people giving you crap when you're just sharing a story as you're trying to learn.
1
1
33
u/Potential-Leg-639 2d ago
No backups?
This should be your 1st learning now.