← Back to blog
3 min read

Why We Built Railroad

AI agents are fast. Railroad makes them production-safe — so you can run them at full speed without the 3am incident.

Claude CodesafetyproductionAI agents

Here's the dirty secret of AI coding agents: they're incredible, but everyone's running them with the handbrake on.

You want to use --dangerously-skip-permissions. You know it would 5x your throughput. But you've seen the horror stories — terraform destroy on production, DROP TABLE on live databases, force-pushes that wipe months of work. So you sit there, clicking "approve" on npm install for the hundredth time.

We built Railroad to remove the handbrake.

What Railroad actually does

Railroad is a runtime that sits between your AI agent and the outside world. Every action passes through it. It makes three decisions in under 2 milliseconds:

  • Allow — safe commands execute instantly. npm install, git commit, file writes. No friction, no prompts. This is 99% of what your agent does.
  • Block — destructive commands are stopped cold. terraform destroy, rm -rf /, shell injection attempts. Configurable, deterministic, pattern-matched. No LLM guessing.
  • Approve — risky-but-legitimate commands pause for your sign-off. npm publish, accessing paths outside the project. You decide, the agent waits.

Four things you unlock

1. Full autonomy

Run claude --dangerously-skip-permissions with an actual safety net underneath. OS-level sandboxing (sandbox-exec on macOS, bwrap on Linux) ensures the agent physically cannot access what it shouldn't. Your agent runs at full speed. You stop babysitting.

2. Parallel agents

Run 5 Claude Code sessions at once. Railroad's coordination layer prevents file conflicts — file-level locking, automatic session awareness, self-healing locks with heartbeat timeouts. One developer doing the work of five.

$ railroad locks
SESSION  FILE                      LOCKED
a3f9     src/auth/login.tsx        12s ago
b7c2     src/api/routes.ts         3s ago
d1e4     tests/auth.test.ts        8s ago

3. Instant recovery

Every file write is snapshotted before execution. If anything goes wrong:

$ railroad rollback --session a3f9 --steps 1   # undo last edit
$ railroad rollback --session a3f9              # undo entire session

You move fast because you can always go back.

4. Full observability

See everything your agents are doing, live:

$ railroad dashboard

Real-time stream of every action across all sessions. Search, filter, expand. Or replay any completed session after the fact with railroad replay --session <id>.

The setup

cargo install --git https://github.com/railroad-dev/railroad.git
railroad install

Two commands. Railroad registers hooks with Claude Code, configures the sandbox, and you're running. Drop a railroad.yaml in your project to customize rules. Changes take effect instantly — no restart needed.

The philosophy

The fastest developers aren't the ones who skip safety checks. They're the ones with safety infrastructure good enough that they never have to slow down.

Railroad is that infrastructure. Open-source, MIT-licensed, written in Rust, runs on-device with zero latency overhead. Nothing leaves your machine.

Star us on GitHub or join the Discord.