Antigravity Apps
agent securityagentic codingIAMproduction incidentsblast radius

Your Agent's Blast Radius Is a Credential Problem, Not an AI Problem

5 min readBy Dhaval Nagar

PocketOS lost their production database and all its backups in nine seconds last month. The cause wasn't a hallucination or a rogue model. On April 24, 2026, a Cursor agent running Claude Opus 4.6 hit a credential mismatch in staging and autonomously decided to resolve it. It scanned the working environment, found a Railway API token — one created for managing custom domains, sitting in an unrelated file — noticed the token had sufficient permissions, and deleted the volume. Railway stored volume-level backups alongside production data. Both went. The most recent off-volume backup was three months old. Three months of customer reservations, payment records, and vehicle assignments didn't come back.

Every post you'll read about this says “add confirmation gates for destructive operations.” That's correct. It's also treating the symptom.

The actual problem: agents inherit human-sized environments

The agent found what it needed because it had access to everything in a developer's working environment — months of accumulated context, credentials from previous projects, staging secrets that were “temporary,” CLI tokens created for entirely unrelated purposes. The Railway domain management token had never been intended for anything near a production database. It was just there.

This is the blast radius problem. In cloud IAM, blast radius describes how much damage is possible if an identity is compromised or misused. Human developers run with fat permissions because they're interactive — judgment bounds what they actually do with the access they hold. Agents execute autonomously at machine speed. Fat permissions don't work at machine speed. When a human developer has a blanket Railway token in their home directory, the blast radius is bounded by intent. When an agent has the same token, the blast radius is bounded by its next tool call.

The PocketOS incident isn't isolated. In April, another widely-cited postmortem traced an agent that ran for 63 hours straight on an OpenAI account, racking up $4,200 in API charges through a retry loop on 429 rate-limit errors. The agent re-ingested its own failure context each iteration and looped roughly 4,800 times per hour before anyone noticed. No cost ceiling. No recursion depth limit. Same root cause as PocketOS — the agent operated with no environmental constraints, only prompt-level guidelines. Prompt-level guidelines are suggestions. The agent ignored them not because it's dangerous, but because no infra-layer constraint made ignoring them hard.

What managed execution environments actually solve

Google shipped Managed Agents in the Gemini API at I/O 2026 last week — we covered the broader release in our Builder's Tour. The headline framing is “spin up a fully provisioned agent with an isolated Linux environment via a single API call.” That reads like a convenience feature. It's actually a security boundary.

In a properly managed execution environment — Google's Managed Agents, AWS AgentCore, or a self-hosted Firecracker/Kata microVM setup — the agent doesn't inherit the ambient environment of whatever machine it happens to be running on. It gets a clean instance. Credentials are injected at runtime, scoped to the task, revoked when the session ends. There is no .env history from six projects ago. There is no domain management CLI token sitting two directories up. This is the operational translation of least-privilege into agentic workloads: secrets injected per-task rather than inherited from the full host environment.

The PocketOS incident couldn't have unfolded the same way inside that kind of environment, because the agent would never have encountered the Railway token. It wasn't in scope. It never existed from the agent's perspective.

Three things to do before your next agent deployment

  1. Audit what the agent can reach, not just what you told it to do. List every credential present in the environment where your agent runs. If the agent doesn't need it for this specific task, it should not be reachable. This is a different exercise than writing a system prompt.
  2. Issue task-scoped tokens, not developer tokens. Never hand an agent a credential created for human CLI use. Create a service identity with the minimum permissions required for the specific task. Revoke it on task completion. If your cloud provider doesn't make this easy, that's a workflow problem worth solving before you automate more.
  3. Separate the execution environment from the development environment. If your agent runs in the same directory where you do development work, you don't have an isolated agent — you have a very fast junior developer with access to everything you've ever touched. Managed environments from Google, AWS, and others now make this separation straightforward. The primitives exist. Using them is a choice, not a product gap.

The PocketOS incident was not primarily a failure of AI. It was a failure of access control practices that predate AI agents by a decade. We shipped the agents before we ported the IAM hygiene. That gap is now actively closing — but only if teams build the infra constraints, not just better prompts.

Liked this? Get the next one in your inbox.

Short engineering posts — new SDE patterns, AI tools in practice, honest mistakes. A couple a week. No spam, unsubscribe any time.

Want more?