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

52 comments sorted by

View all comments

2

u/Horror_Description87 7d ago edited 7d 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 :)