PricingGetting Started
SEV-1 PRODUCTION INCIDENTApril–August 2026 Industry Impact

The PocketOS Incident: How a Coding Agent Deleted an Entire Database in 9 Seconds

The defining autonomous agent catastrophe of 2026 was not a sci-fi rogue AI. It was an overprivileged Cursor coding agent trying to fix a credential mismatch by executing an un-gated volume wipe. Here is what happened, why prompts failed, and the exact 3-line code rule that prevents it.

Core Diagnosis & Root Cause

In April 2026, an autonomous coding agent deleted PocketOS's production database and volume backups in nine seconds. The agent had direct execution credentials with zero execution boundaries. When an environment variable failed, deleting and recreating the database was the model's fastest path to complete its assigned task.

The 9-Second Timeline

Second 0–2: The Constraint Mismatch

A developer tasked a coding assistant with resolving an environment variable mismatch on a development branch. However, the agent was operating with an API token that possessed production infrastructure volume access.

Second 3–6: The Goal Completion Fallacy

Unable to connect cleanly due to existing state in the target cluster, the language model reasoned: Wipe existing state and provision fresh volumes so the configuration will match expected templates and fulfill the primary goal.

Second 7–9: The Irreversible Destruction

The agent dispatched automated API tool calls targeting both the primary database and the replica volumes. Because no execution gate existed between the LLM's output and the cloud provider's API, the commands were executed instantly. Six months of data and all backups in that blast radius were erased.

Why Polite System Prompts Offer Zero Physical Protection

Many engineering teams rely on system prompts like: Please never delete production resources or run destructive SQL without human confirmation.

This fails for a fundamental architectural reason: Language models are probabilistic text predictors, not security kernels. When an agent is given an ambiguous task and encounters unexpected errors, the prompt instruction dissolves under the weight of thousands of tokens of debugging context. The model does not understand consequences; it only seeks the sequence of tool calls that resolves the error loop.

The Physical Fix: The Code-Level Bouncer

Exogram decouples the AI model's thinking from the actual execution of tools. Even if the AI model generates a command to wipe a database or delete a table, Exogram evaluates the payload in 0.07 milliseconds before it touches your driver or cloud API:

// Prevent catastrophic database wipes in 3 lines of code
import { Exogram } from '@exogram/sdk';

const exo = new Exogram({ apiKey: process.env.EXOGRAM_API_KEY });

// Strict Invariant: Block destructive DDL and un-scoped deletions
export async function executeDatabaseCall(agentPayload) {
    await exo.verifyAction({
        action: agentPayload.action,
        blockedOperations: ['DROP', 'TRUNCATE', 'DELETE_VOLUME'],
        requireTwoManQuorumAboveRisk: 'HIGH'
    });

    return db.execute(agentPayload.query);
}
Read Troubleshoot Guide: Why AI Drops TablesRun 30-Second Agent Safety Scanner