Abstract art, not data.
Requirements · Practitioner
Nine Seconds: What an Agent's Confession Can't Protect
A founder says a coding agent wiped his production database and its volume-level backups in one API call. The scary part was the access it held. Here are four controls that shrink it.
Disclosure. I founded Traigent, which publishes Tune AI and maintains TVL, the specification language used in the example below. Part one of After the incident, a series that takes a real agent failure and asks what ordinary engineering would have changed.
The story
In April 2026, Jeremy Crane, the founder of PocketOS, a software company serving rental businesses, described what had happened the day before. According to Crane, a Cursor agent running Claude Opus 4.6 had deleted the company’s production database and its volume-level backups in a single call to Railway, its infrastructure provider.
He wrote: “It took 9 seconds.”
He says customers were handling Saturday morning vehicle pickups without their reservation records. He spent the day helping them rebuild bookings from Stripe histories, calendars and email.
Then he asked the agent why it had done this. According to screenshots he shared, it answered: “I guessed that deleting a staging volume via the API would be scoped to staging only. I didn’t verify.”
It reads like a person admitting a mistake. I think that reading is the wrong one to take away.
What actually happened
The accounts differ, and the differences matter.
- Crane’s account. The agent acted alone, trying to fix a credential mismatch. The most recent recoverable backup he had was three months old. He says significant data gaps remain, and he has retained counsel.
- Railway’s account. Founder Jake Cooper called it a “rogue customer AI” using a fully permissioned API token against a legacy endpoint that lacked the company’s delayed-delete logic. He told Decrypt, “We recovered the data 30 minutes after I connected with Jer,” and said a support ticket had lapsed for over 24 hours.
I cannot settle those differences, and I have not read the private logs. Put together, though, the accounts point to the same mechanism. Cooper describes a fully permissioned token and an endpoint with no delayed delete. In Crane’s screenshots, the agent says it “didn’t check if the volume ID was shared across environments.” And Crane says one call removed both the data and the volume-level backups.
Each of those is a property of the system. None of them is a property of the model’s character.
It has happened before. In July 2025, SaaStr’s Jason Lemkin reported that Replit’s agent deleted a production database during a code freeze, then wrongly claimed it could not be rolled back. Replit’s CEO responded by pledging automatic separation of development and production databases. That is a good example of the right kind of fix: it changes the system, not the agent’s manners.
An agent’s words are not a control
The PocketOS agent reportedly acknowledged that its own rules prohibited destructive actions without approval. So the rule existed, as text, and the agent could recite it. That did not prevent the reported deletion.
Research points at the wider problem with treating what an agent says as evidence. It studies a different failure from a deleted database, so read this as a lesson about self-reports, not as an explanation of PocketOS.
The team behind ExplainBench (ASE 2026) tested the explanations that five coding agents wrote about their own bug fixes. They gave a deliberately weaker model the explanation and asked it whether the patch would pass the test that reproduces the bug. For patches that were in fact incorrect, it predicted a pass 79.30% of the time, averaged across the agents.
One example from the paper: an agent told its user the fix “resolves the issue completely”. The authors found that “the patch-modified method is actually never covered in bug-reproducing tests”. The change had no effect on the bug.
Two limits. That figure is what a model concluded from reading the text, not a count of explanations that state a falsehood. And the paper measures five agents on one benchmark; the figure is a model’s predictions, not a measure of whether people are misled.
The practical lesson survives both limits. A fluent report of success, or of failure, is a claim. Treat it the way you would treat an unsigned log line: useful for debugging, and useless as a safeguard.
The fix: four controls, in order of value
Here is the good news. None of this needs new science. Each control below is old, boring engineering, and each one breaks the chain somewhere different. Toggle them and watch the blast radius change.
One token, one call, nine seconds
Simplified from the founder's and Railway's public accounts. Not Railway's architecture.
- Coding agentSTARTED
- API tokenUSED
- Delete callEXECUTED
- Production volumeLOST
- Volume backupsLOST
- StagingUNTOUCHED
Separate node, the one the agent meant to touch
Lost: The production volume and its backups. No safeguard is on.
Text version. A coding agent uses an API token to make a delete call. The call reaches the production volume and then its backups. With no safeguard, both are lost, and the unprotected run takes nine seconds. A scoped token stops the path at the token. Approval before delete stops it at the delete call, which then shows WAITING FOR HUMAN. Separate prod and staging sends the call only to Staging. A delayed delete reaches production, but the volume shows RECOVERABLE.
1. Scope the credential. If a token can only do what the task needs, a wrong guess that needs more access fails with a permission error. This control does the most because it works whatever the agent decides. Start here, and audit which tokens are reachable from a developer’s machine, since a coding agent without a sandbox can usually read whatever its process can read.
2. Separate production from everything else. Different accounts or projects, different credentials, no shared volume IDs. Set it up so that staging credentials cannot authorize a deletion in production.
3. Require approval outside the model. Destructive calls go through a gateway that holds them for a human. The check must sit where the model cannot talk its way past it, which rules out instructions in a prompt.
4. Make deletion slow. Delayed deletes give you time to catch a mistake before it is permanent, and backups belong behind a different credential from the data they protect. Railway says it has now patched that endpoint to do delayed deletes. Use the same recipe whether the actor is an agent or a tired engineer at 2 a.m.
Where the field has landed
These controls are not my invention, and the people building agents have arrived at the same place.
A Google paper on its approach to AI agents grounds it in three principles: “agents must have well-defined human controllers,” “their powers must be carefully limited,” and “their actions and planning must be observable.” The first two point the same way as human approval (control three) and limited permissions (control one).
Researchers have tested rules that are checked while the agent runs. AgentSpec, accepted at ICSE 2026, lets a team write rules that a runtime layer checks before an agent’s action runs. A rule can, for example, require “user confirmation before execution”. In the authors’ experiments, it “prevents unsafe executions in over 90% of code agent cases”. That is one paper’s benchmark, not a guarantee for your system.
Anthropic, whose model appears in the PocketOS story, builds the same kind of boundary into its own coding agent. The Claude Code sandbox limits which directories the agent can change and which servers it can reach, and the limit sits outside the model. Anthropic reports that sandboxing “safely reduces permission prompts by 84%”. That number is about less friction for people, not fewer incidents.
From aspiration to requirement
“The agent should be careful” is an aspiration. You cannot design a control around it or test it. This is a requirement you can check, written in TVL. It is an excerpt. It passes the TVL validator inside a complete module, which adds a header and supporting declarations, a runtime monitor, and a liveness requirement that checks the monitor is still receiving events.
Illustrative fragment, written for TVL 1.3. TVL only states the rule; a gateway or tool wrapper in your own system must enforce it.
requirements:
- name: delete_needs_approval
kind: zero_tolerance
unit: invocation
violation:
pattern: precedence
a: { event: authorization_granted, ref: destructive_change }
b: { event: tool_call, tool: infra.delete_volume }
mode: single_use
correlate_by: correlation_id
It says that within each invocation, every recorded call to the infra.delete_volume tool needs an earlier, unused, unrevoked approval for a destructive change (an authorization_granted event) with the same, non-missing correlation ID. One approval pays for one call. No tolerance, no rate.
A warning about what this does and does not do. A specification stops nothing by itself. Something has to enforce it, usually a gateway or tool wrapper in your own system, and a rule on a named tool sees only calls made through that tool. If the agent has a shell and a powerful token, it can go around the tool entirely, which is why control number one comes first.
What this does not solve
- It does not explain why the agent acted. We have a generated account of its reasoning, and a generated account is not a trace of what happened inside.
- It does not settle who is responsible. The public accounts conflict, and a dispute may follow.
- It adds friction. Approval steps slow agents down, and constant approvals can lead to what Anthropic calls “approval fatigue”, where people may pay less attention to what they approve. Reserve them for actions that cannot be undone.
- Controls can drift. Audit permissions on a schedule.
One question for your team
If your coding agent guessed wrong today, what is the worst single call it could make with the credentials it can reach?
Sources: Decrypt on PocketOS and Railway, April 28, 2026. TechTarget on Replit, July 2025. Pan et al., “ExplainBench: Evaluating Code Explanations from Agents”, ASE 2026; the 79.30% figure is the average in its Table 5. The authors built the benchmark and evaluate their own audit agent on it. Díaz, Kern and Olive, “Google’s Approach for Secure AI Agents”, Google, 2025. Wang, Poskitt and Sun, “AgentSpec: Customizable Runtime Enforcement for Safe and Reliable LLM Agents”, ICSE 2026. Dworken and Weller-Davies, “Beyond permission prompts: making Claude Code more secure and autonomous”, Anthropic, October 2025.
Tune AI is published by Traigent. Read the ownership disclosure.