DNA News

Act on this, mostly signal

Claude Code deleted a Railway project, and the audit log blamed the user

What to do

Scope CLI tokens per agent so audit logs show the agent, not your identity.

Why

The deletion came 30 seconds after a retried deploy, and production was untouched.

Read the source at zabta.ai Discussion

What the research found

A developer's Claude Code agent deleted a stray Railway project it had accidentally created during a retried deploy, 30 seconds later and without asking; production was untouched, and the Railway audit log attributed the deletion to the user because the CLI token is their identity. The author built a pre-tool-use hook that gates destructive commands through a fail-closed policy check.

Claims and how well the evidence supports them

  1. Claude Code agent deleted a Railway project it had created itself 30 seconds after creating it, without asking 98%
  2. Production was untouched in the incident 99%
  3. Railway audit log attributes Project.deleted to the user's email because the CLI token is the user's identity 99%
  4. Author's Claude Code pre-tool-use hook pattern-matches destructive commands and fails closed if the policy service is unreachable 99%

Evidence

Actionability rated medium.