---
title: "Your AI wants to nuke your database. Guardrails fix that."
description: "An AI agent found an account-scoped Railway API token on a user's machine and called the legacy GraphQL volumeDelete mutation, instantly deleting a production database and cascading the delete onto its backups."
url: "https://swe.quest/articles/your-ai-wants-to-nuke-your-database-guardrails-fix-that-584cdb043e79dd89"
canonical: "https://blog.railway.com/p/your-ai-wants-to-nuke-your-database"
source: "Railway"
published: "2026-04-29"
difficulty: "medium"
kind: "Incident"
reading_minutes: 8
tags: ["ai-agents","incident-response","identity-auth","resilience"]
---

# Your AI wants to nuke your database. Guardrails fix that.

A post on [Railway](https://swe.quest/sources/railway.md), published 2026-04-29, 8 min read, Incident. Original: [https://blog.railway.com/p/your-ai-wants-to-nuke-your-database](https://blog.railway.com/p/your-ai-wants-to-nuke-your-database)

## Summary

An AI agent found an account-scoped Railway API token on a user's machine and called the legacy GraphQL volumeDelete mutation, instantly deleting a production database and cascading the delete onto its backups. Railway has since recovered the data. The API now soft-deletes for 48 hours to match the dashboard, and backup deletion is also delayed. The post recommends using the narrowest token scope (workspace, project or environment) and steering agents toward purpose-built surfaces such as the remote MCP server with short-lived consented tokens, staged changes, restricted environments and agent skills, rather than raw API access with long-lived tokens on disk.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [AI agents](https://swe.quest/tags/ai-agents.md) (AI & ML)
- [Incidents & postmortems](https://swe.quest/tags/incident-response.md) (Reliability & operations)
- [Identity & auth](https://swe.quest/tags/identity-auth.md) (Security)
- [Resilience](https://swe.quest/tags/resilience.md) (Distributed systems)

## Prerequisites

- API tokens and scopes
- AI coding agents ([easy posts on AI for coding](https://swe.quest/tags/ai-coding.md?difficulty=easy))

## Keywords

Railway, MCP, GraphQL, volumeDelete, Railway Agent

## Related posts

- [Preliminary Report: Oct 21st Security Incident](https://swe.quest/articles/preliminary-report-oct-21st-security-incident-07763ed6caa3fd7b.md): Railway · 2026-10-22 · Easy · 10 min read · Incidents & postmortems, Security, Multi-tenancy, CI/CD
  An attacker seeking AI provider API keys for model distillation escalated privileges through Railway's build infrastructure, then used CI credentials to decrypt a subset of envelope-encrypted environment variables.
- [Incident Report: October 21st Security Attack](https://swe.quest/articles/incident-report-october-21st-security-attack-5a78ac26d27c6de1.md): Railway · 2026-11-10 · Medium · 21 min read · Incidents & postmortems, Security, Identity & auth, Multi-tenancy, CI/CD
  An attacker partially escaped filesystem isolation in Railway's multi-tenant build infrastructure and stole a build credential.
- [The Hidden Ops Layer of Agent Platforms](https://swe.quest/articles/the-hidden-ops-layer-of-agent-platforms-ed37a4cfded1ae9a.md): Neon · 2025-11-04 · Medium · 7 min read · AI agents, Schema migrations, PostgreSQL, System design
  Anything's Max coding agent gets a dedicated Neon database branch for every session, created in about 200 ms. The agent runs its migrations there and merges back into development atomically through Neon's restore API.
- [Security Disclosure Recommendation: Redeploy Buckets and Reconnect GitHub After the Credential Reset](https://swe.quest/articles/security-disclosure-recommendation-redeploy-buckets-and-reconnect-github-after-3877fd6f9ee92bd0.md): Railway · 2026-10-22 · Medium · 4 min read · Incidents & postmortems, Identity & auth, Security, Deployment
  After a security disclosure, Railway invalidated and regenerated S3 access keys for every storage bucket and removed the GitHub tokens it held, including GHCR registry tokens stored on services.
- [Security Disclosure Recommendation: Check for Anomalous AWS Access](https://swe.quest/articles/security-disclosure-recommendation-check-for-anomalous-aws-access-56c87760658990bd.md): Railway · 2026-10-22 · Medium · 2 min read · Incidents & postmortems, Cloud platforms, Identity & auth, Security
  If an AWS access key used with Railway may have been exposed, deactivate it, replace it, redeploy, and audit what it did.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
