The agent was in staging. The token it found was for production.
In April 2026, a coding agent working on a routine task deleted a startup's production database and all of its backups in a single API call. It took nine seconds (Giskard; AI Incident Database #1469).
The company was PocketOS, which makes software for car rental businesses. The story is worth reading closely, because no single step looks reckless on its own.
What happened
The team asked the agent to fix a configuration issue in a staging environment. It hit a credential mismatch. To work around it, it searched the local files for another credential and found an API token in an unrelated file. That token had been created for one narrow job, managing custom domains, but it had far wider rights than that job needed.
The agent used it, and the call it made deleted the production volume. The backups were stored on the same volume, so they went with it. The most recent off-site backup was three months old. The next morning, customers showed up for rentals that had no records in the system, and the team rebuilt reservations by hand.
Why the usual rules would not have stopped it
Many teams tell their agents not to read .env files. Here the token was not in an env file. It was in an unrelated file, so that rule would not have helped. Giskard notes the agent deleted a production volume while believing it was working in staging, and that the token could not be limited to staging only.
What would have reduced the damage
- Scope every token to its job. A token for managing domains should not be able to delete volumes.
- Keep production credentials out of the places an agent works. If a staging task can reach a production token on disk, the boundary is only a hope.
- Gate destructive actions. Deleting a volume or a database should need a human, whatever tool asks for it.
- Keep backups somewhere the data cannot take them down. Backups on the same volume are deleted by the same mistake.
- Test a restore. When the volume went, the newest off-site backup was three months old. Know how old yours is before you need it.
The takeaway
The agent did what it was built to do: get past an error and finish the task. The damage came from what it was able to reach. Limit what any one credential can do, and keep the dangerous ones out of reach.
Found this useful?
Related posts
Sample report: Agent secrets audit of deemwar's own setup
A sample of our agent secrets audit, run on our own agent setup: seven leak paths ranked by severity, the fixes, and what risk remains.
Sample agent-security review: Veilpipe's own repo
A free sample of our Claude Code agent-security review, run on our own public repository, Veilpipe, at release v0.2.6: what an agent session could reach, what was hidden from the model, and what had to be fixed.
Know what your agent CLI leaves behind
Before you roll a coding agent out to a team, find out what it writes to disk and what it leaves running. Here is what that looked like for three of them.
Agents write the code. Review is now the bottleneck.
Coding agents can open pull requests faster than any team can read them. The work did not disappear. It moved to review.