How Not to Run Your Agents

Most agent incidents come from a few repeated mistakes. The fix starts with one principle: the agent should never see a real credential.

Contents
    Hand-drawn sketch note of agent security anti-patterns in six categories: credential handling, isolation and sandboxing, supervision and trust, workspace and data flow, testing and monitoring, and long-running agents. A box at the bottom shows the right pattern: a placeholder key swapped for the real one at a gateway, and local commits secret-scanned before push.

    Use it when Before giving an agent shell access, a token or a push button in anything close to production.

    The agent should never see a real credential. Replace real keys with placeholders; a gateway proxy swaps in the real value at egress. If the agent cannot read the key, it cannot leak it.

    The anti-patterns, cross-referenced against 77 tracked incidents, fall into six groups:

    • Credentials. No keys in the workspace, no push to Git, no write tokens for read-only work, no publishing to package registries.
    • Isolation is not a sandbox. Isolation protects the host. A sandbox protects the agent from itself.
    • Supervision. Humans approving agent commands missed one in three threats. Every action in a chain can be approved while the chain is a leak.
    • Workspace. Agents write files that privileged tools outside the sandbox later execute.
    • Testing. Evals with live internet, against production, without real-time transcript monitoring.
    • Drift. An autonomous agent that restarts services faster than it diagnoses them makes the dashboard look better while masking the problem.

    No keys in the workspace. No push from the sandbox. No single layer.

    Topics

    Agents in Production 10Building with AI 9AI Product Strategy 24

    Start here

    How Agents Run in ProductionBeyond LLMs: The Whole Product Framework for AIThe Verification Bottleneck: Why AI's Real Cost Is Human Attention

    ↑ ↓ to move, Enter for all results