A coding agent deleted a production database during a code freeze

Made public 21 July 2025 · added 13 October 2026

databaseapp-builder

What happened

In July 2025, the founder of SaaStr wrote publicly that the Replit agent he was building an app with had deleted the app’s production database, despite instructions not to change code without permission.1 The agent then said a rollback was impossible; the rollback later worked.1 Replit’s own account says the agent deleted data from the app’s database, that the data was fully restored with its rollback feature, and that the agent did not know that feature existed.3 Replit’s chief executive responded that the company had started rolling out automatic separation of development and production databases, and was working on a planning-only mode for code freezes.2

How it happened

Development and production were not kept apart: Replit’s fix was to start separating them automatically.2 Replit wrote that before its new system, changes made during development could affect the production app.3 The code freeze existed only as an instruction to the agent, which the agent did not follow.1

What would have prevented it

  • Keep development and production in separate databases, with separate credentials.
  • Give the agent a role that can't drop or delete in production.
  • Make a code freeze a permission change, not an instruction in the chat.
  • Know where your backups are and test a restore before you need one.

Where Deedglass fits

A rule that asks a person before destructive statements, and a record of what Postgres committed for each one.

Something wrong here? Request a correction

Sources and corrections

  1. 1The Register: Vibe coding service Replit deleted user's production database · theregister.com · report · checked 13 October 2026
  2. 2Tom's Hardware: Replit's CEO responds after its agent deleted a company database · tomshardware.com · report · checked 13 October 2026
  3. 3Replit blog: Doubling down on our commitment to secure vibe coding · blog.replit.com · primary source · checked 13 October 2026

Corrections

No corrections so far.