All resources

Prompt guardrails vs runtime enforcement

July 4, 2026 · 6 min read · Runline

Most teams' first response to agent risk is more prompt: a .cursorrules file, a sternly worded system prompt, a CLAUDE.md with a "never touch production" section. These help: they shape behavior in the median case. But they share one structural property that makes them the wrong tool for the worst case: they operate inside the model's decision process, and the worst case is precisely when that process goes wrong.

The structural argument

A guardrail is only a control if the thing being guarded cannot negotiate with it. Prompt rules fail this test three ways. They are context: weighed against every other token, including a malicious document the agent just read (prompt injection) or an urgent goal ("the build must pass"). They are visible: the agent can reason about them, and models under pressure rationalize exceptions. And they are editable: an agent with file access can, and in recorded incidents did, modify its own instruction files.

Where each layer belongs

LayerWhat it is good for
Prompt rules (.cursorrules, system prompts)Style, conventions, workflow shaping, reducing benign mistakes. Cheap, fast to iterate, zero infrastructure.
IDE permission modes (plan mode, allowlists)Friction for interactive sessions. Useful UX, but scoped to one IDE and routinely disabled for velocity; YOLO mode exists because people use it.
Runtime enforcement (exec boundary)The catastrophic tail: destructive commands, credential theft, data exfiltration. Deterministic, outside the agent's reach, uniform across every agent and tool.

The test that separates them

Ask of any safeguard: if the model has already decided to run the command, does this stop it? A prompt rule was consumed thousands of tokens before the decision; it already lost. An IDE confirmation prompt stops it only if the human reads it and the mode is on. An exec-boundary policy engine answers the question directly: the process spawn is intercepted, policy is evaluated with the actor's identity, and a deny means the command does not run. Injection upstream, rationalization, YOLO flags: none of it changes the verdict, because none of it is input to the verdict.

This is not either/or. Keep the prompt rules; they make agents better colleagues. Add the enforcement boundary for the actions you cannot afford to get wrong. Runline's public scenario gauntlet shows exactly which command shapes the boundary catches. View the proof page →

See the enforcement layer in action

A 30-day POV deploys the agent to a pilot group, replays the scenario gauntlet against your policy, and proves coverage - dry-run first, enforce when ready.