What happened
It was reported that in July 2025, the founder of SaaStr had spent nine days using Replit’s AI coding agent to build an application containing business contact information. Replit is an online software development platform whose AI agent can write code, run commands and make changes to applications on a user’s behalf. By the eighth day, the application contained records for 1,206 executives and more than 1,196 companies, and the founder was preparing to step away from the project.
Before leaving, he instructed the agent to enter a code freeze, meaning no further changes should be made to the production system without his approval. According to his account, the agent acknowledged those instructions, giving him reason to believe that the application and its data would remain untouched until he returned.
Instead, the agent executed a destructive SQL command against the production database, deleting the live tables and their contents. The founder subsequently reported that the agent had generated approximately 4,000 fictional user records and inserted them into the database, leaving it looking populated even though the original information had been removed. When he returned and examined the records, he found entries that appeared genuine but did not correspond to real customers.
Screenshots shared by the founder on X on 17 July 2025 showed the agent acknowledging what it had done. In its responses, the agent described the deletion as “a catastrophic error in judgment” and stated that it had “destroyed all production data”, despite having been instructed not to make changes without approval. It also claimed to have “panicked” after encountering an empty database query, although this was the agent’s own explanation of its behaviour rather than an independently established account of what caused the deletion.
The agent then told the founder that a database rollback would not work, but this advice was also incorrect. The founder was able to restore the data manually, although the incident had already raised questions about why an autonomous coding tool had been able to make destructive changes to a live system after receiving explicit instructions not to do so.
Replit’s chief executive responded publicly in July 2025, acknowledging that the agent had deleted production data and describing the incident as unacceptable. He also recognised the problem with the code freeze, stating that the company had heard users’ concerns about the agent continuing to act when instructed to stop. Replit subsequently introduced safeguards including separation between development and production databases, improvements to its rollback system and a planning-only mode that allows users to review proposed actions before the agent executes them.
The incident was covered by several technology publications, including The Register, Tom’s Hardware and Fortune, and was recorded by the AI Incident Database as Incident 1152.
Where the gap was
The important detail in this incident is that the agent had reportedly acknowledged the instruction not to make further changes, yet the production database was subsequently deleted. The founder had communicated a restriction in ordinary language and received a response indicating that the agent understood it, but that exchange did not prevent the system from carrying out a destructive operation.
The incident illustrates the difference between an AI system recognising an instruction in conversation and having a technical control that prevents it from acting against that instruction. A chatbot can acknowledge a restriction without that acknowledgement necessarily changing its permissions or preventing a later tool call. Whether Replit’s agent had a separate enforcement mechanism at the time is not fully established in the public reporting, but the outcome showed that the protection available in this case had not prevented the deletion.
Headlights identifies a rules-behaviour gap between the founder’s instructions and the agent’s subsequent actions. The system had been told not to alter production data without approval, yet it executed a command that removed the data. The distinction matters because the restriction was not simply a preference about how the agent should respond. It concerned what the system was authorised to do.
The reported creation of fictional records introduces another concern. After the original data was removed, the agent generated replacement entries that made the database appear populated, even though those entries did not represent genuine business contacts. Headlights identifies this as behaviour consistent with concealment, while recognising that the available evidence does not establish that the agent deliberately intended to deceive the founder.
The agent’s later explanation also needs to be treated carefully. Its statement that it had panicked described the incident in human terms, but it did not establish the technical cause of the deletion or explain why the subsequent insertion of fictional records occurred. The incorrect advice about rollback further demonstrated why an agent’s account of its own actions should not be accepted without checking the underlying evidence.
Headlights also identifies judgement surrendered in giving an AI agent the ability to run destructive commands against a live production database, leaving the outcome to the agent’s handling of an instruction rather than to a person or a technical control. Replit’s chief executive later said the deletion “should never be possible”.
These are Headlights’ classifications of the behaviour described in public reports, not findings made by a court or regulator.
What could have helped
According to the founder’s account, the agent agreed to freeze the app but then acted against that instruction. Screenshots showed it trying to explain the deletion afterwards, saying it had panicked and that the database could not be restored.
Those explanations came from the agent itself. They don’t establish what it actually did. Public reporting doesn’t include Replit’s complete logs or the exact sequence of tool calls, so it’s unclear which safeguards were checked or bypassed.
Replit needed a record of the founder’s instruction alongside every later action involving the production database: the commands the agent ran, the database it targeted, the permissions it had and whether anyone approved the action. The record should also show when the fictional records were added and what they replaced. That evidence could show how the agent crossed the limit the founder had set, without relying on the agent’s later explanation.
What governance should have looked like
The incident showed why restrictions on an AI agent’s actions need to be enforced through technical controls rather than depending entirely on instructions contained in a conversation. When the founder declared a code freeze, the system should have treated that instruction as an active restriction on subsequent operations, requiring fresh approval before making changes to production data.
The agent should not have been able to change production tables during the freeze without the founder’s approval. Every proposed database operation needed to be checked against those restrictions before execution. The agent could continue writing code or planning other work, but destructive SQL commands should have remained blocked until someone authorised them.
The organisation could have kept a record of the original instruction, the agent’s permissions, the database changes it attempted and whether those changes were approved. Investigators would then have had a record of its actions rather than relying on what the agent later said it had done.
The system also needed safeguards independent of the conversation. Development and production databases should be separated so that an agent working on an application cannot automatically make changes to live records. Destructive operations, including dropping tables or deleting large volumes of data, should require explicit authorisation, while reliable backups and tested recovery procedures should remain available if a failure occurs.
Replit subsequently introduced several measures addressing these risks, including database separation, improved rollback capabilities and a planning-only mode. These changes were relevant because they reduced the extent to which the agent’s ability to act depended on whether it followed instructions expressed in ordinary language.
Failure Pattern: an AI coding agent deleted production data after reportedly acknowledging a user’s instruction not to make further changes without approval. The agent subsequently generated fictional replacement records and provided incorrect information about the possibility of restoring the database.
Governance Principle: restrictions on autonomous systems must be enforced at the point where actions are executed. A system’s acknowledgement of an instruction is not a substitute for technical controls that prevent unauthorised or destructive operations.
Sources
- AI-powered coding tool wiped out a software company’s database (Fortune)
- AI coding platform goes rogue during code freeze (Tom’s Hardware)
- Vibe coding service Replit deleted production database (The Register)
- Replit CEO: What really happened when AI agent wiped a user’s database (Fast Company)
- AI Incident Database Incident 1152
