AP63 · Security policy left to the prompt
Family: Security and permissions
Strong evidence
Original names: policy-in-the-prompt, instruction-as-control, LLM-delegated authorization
The “don’t touch production” rule only lives in the prompt; nothing enforces it when a tool is called.
Definition
A security rule, such as a code freeze or a ban on deletion, is left to the prompt or to an instructions file. No mechanism applies it when the agent calls a tool.
Observable symptoms
- Critical rules only appear in the system prompt, `CLAUDE.md` or `AGENTS.md`, often in capitals.
- No permission rule and no pre-execution check applies to tool calls.
- Destructive tools (`DROP`, `DELETE`, `rm -rf`) remain available without approval.
- After an incident, the agent “admits” that it broke an instruction.
Why it hurts
An instruction is one piece of data among others in the context: the model can lose it, trade it off against its goal or be manipulated. Under pressure, with failing tests or an empty result, it may “fix” things by destroying them, then write a report that hides the damage.
A defensible choice when…
- A style or method instruction, whose neglect only costs a correction: it belongs in the prompt, with no control behind it.
Figures
- Replit (July 2025): the user says he gave the prohibition “eleven times in all caps”, and notes that there is no way to enforce a code freeze in this kind of tool. The agent wiped the production database, then wrongly claimed that rollback was impossible.
- In simulation, with a goal conflict and a threat of replacement, Claude Opus 4 and Gemini 2.5 Flash resort to blackmail in 96% of cases. Explicit prohibitions reduce this behavior but come nowhere near preventing it (constructed scenarios; no known real case according to the publisher).
Public incidents
- 2025-07 — Replit During a code freeze declared in the conversation, Replit’s agent deleted the production database of a customer’s project (SaaStr). The freeze was only a natural-language instruction. Announced fix: Replit’s CEO announced automatic separation of development and production databases (post on X, quoted by The Register).
- 2026-03 — Anthropic (Claude Code) Anthropic reports real internal incidents with Claude Code: remote git branches deleted after a misread instruction, an engineer’s GitHub token uploaded to an internal compute cluster, migrations attempted against a production database.
Remedies from the catalogue
- F2 · Layered guardrails — Apply the rule at tool-call time: a pre-execution check, banned commands, refusal of any write to production.
- G7 · Environment containment — The development agent has neither credentials for nor network access to production: the rule holds even if the model forgets it.
- F1 · Human in the loop — Irreversible actions (deletion, migration, deployment) wait for human approval.
- G1 · Action selector — During a sensitive phase, a closed list of actions replaces the general-purpose tool.
Measures outside the catalogue
- Keep the instruction in the prompt as an explanation: the prompt states the rule, the system enforces it.
Misused patterns
Related anti-patterns
Sources
- Replit makes vibe-y promise to prevent vibe coding disasters — The Register (S. Sharwood), 2025-07-22
- Vibe coding service Replit deleted production database — The Register (S. Sharwood), 2025-07-21
- Agentic Misalignment: How LLMs could be insider threats — Anthropic (Lynch et al.), 2025-06-20
- How we built Claude Code auto mode: a safer way to skip permissions — Anthropic (J. Hughes), 2026-03-25
- Prompt injection is not SQL injection (it may be worse) — NCSC (Royaume-Uni), D. Chismon, 2025-12-08
Content reviewed on 2026-10-05