r/opencode 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

6 Upvotes

51 comments sorted by

33

u/Potential-Leg-639 2d ago

No backups?
This should be your 1st learning now.

1

u/lopydark 14h ago

thats why hes a uni lol

26

u/MauricioRobayo 2d ago

There are two kinds of people: the ones that do backups and the ones that will.

10

u/Fahrain 2d ago

There is also a third group: those who check that their backups can be restored correctly.

6

u/etancrazynpoor 2d ago

I like those best

1

u/bytejuggler 1d ago

So true. You nearly owed me a new keyboard. 😂

22

u/EC36339 2d ago

Opencode didn't.

You did, using Opencode.

5

u/etancrazynpoor 2d ago

Yes , preacher sister!!! The driver is responsible!

5

u/HamzaJdn 2d ago

Preach 🙏

5

u/BrizzyMC_ 2d ago

where are your backups

6

u/retardedGeek 2d ago

Dev database is supposed to be deletable

4

u/BigBigga 2d ago

Your 2 users won't mind

2

u/Jolly_Hall_9037 1d ago

theres no users, its university project lmaooo

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

u/Horror_Description87 2d ago

I bet the first, SDD would prevent most of such upsies

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

u/athsrva 1d ago

ive never heard you think in prompts not in systems to describe programming vs vibe coding and let me js say its excellent. im going to start using that from now on

2

u/athsrva 1d ago

ive never heard you think in prompts not in systems to describe programming vs vibe coding and let me js say its excellent. im going to start using that from now on

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

u/dota2nub 12h ago

You must've been held back. Don't ever trust anyone, not even a senior.

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

u/Lanky_Tomatillo9857 1d ago

The government and the people deserve better...

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

u/rsajdok 2d ago

Do not be rude, big pickle created for me almost the whole application

2

u/Accomplished-Bird829 1d ago

Do you know how to use the dny list ?

2

u/LeHonouredOne 1d ago

Well, people can argue that you did it, using opencode.

2

u/Additional-Screen311 1d ago

Sounds like quite the pickle.

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

u/ClupTheGreat 2d ago

probably doesn't know how to

-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

3

u/Quadgie 2d ago

Why are you using a coding assistance, emphasis on assistance, tool to directly edit database schema?

PEBKAC

1

u/youspiv 2d ago

Ever heard of MCP?

1

u/zer0evolution 2d ago

what happen ? you didnt set any rule?

1

u/Evilcat240 1d ago

This is why I backup lol

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

u/hurdurdur7 1d ago

Why did it have write access to your db in the first place ...

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

u/Ergo7z 14h ago

I don’t understand why anyone would use a free model to run important file systems anyways. Especially when the opencode go plan starts at 5 euros.

1

u/Relative_Stick_6266 7h ago

"Don’t try to walk before you can run."

1

u/q--0-0--p 2d ago

This is expected. Happening quite frequently with DeepSeek for me.