Hard checks on tool calls beat prompt rules: 4 agent guardrail patterns from 8,176-call replay

Individual-Shower973 · reddit · 2026-09-30

The author replayed two months of their Claude Code history (8,176 tool calls) against a set of hard pre-call checks and learned: prompt constraints are only requests — a model under pressure can talk itself past them, while a check on the tool name and arguments before execution cannot be argued with.

Four patterns that held up:

Replaying a short never-list (recursive deletes, force pushes, reset --hard, edits to the agent's own settings) would have stopped 117 rm -rf calls.

Original post →

More from coding & agent

coding & agent channel →