Instructions didn't stop my agents. Checks on the call did. Four patterns that held up
Summary
A practitioner shares four hard guardrail patterns that enforce checks on AI agent tool calls themselves—rather than relying on prompt instructions—validated against two months of Claude Code history, showing that runtime argument validation, ordering constraints, worst-case budget reservation, and explicit refusal messages prevent agents from bypassing instructions.
Similar Articles
What hard stops do you put on your AI agents?
A practitioner shares their non-negotiable hard-stop limits for personal AI agents (shopping, email, scheduling, research) and asks the community what additional safeguards they enforce and how they hold up against prompt injection rather than relying on the agent to behave.
Should AI agent tool calls be checked before they run?
A discussion on whether AI agent tool calls should be checked before execution, exploring safety and validation considerations.
I've killed more agents than I've kept. Sharing the patterns in what dies and why.
The author shares five patterns that consistently kill AI agents: too many jobs per agent, no human-in-the-loop for destructive actions, unstructured outputs, no spend caps, and lack of uncertainty escalation paths. Practical guardrails and a checklist for reliable agent deployment are provided.
agents that loop on tool errors: the fix was mostly in what the tool returns, not the prompt
A practitioner shares lessons on stopping AI agents from looping on failed tool calls: return short, specific error messages with hints, add a retry guard that detects repeated identical failing calls, and distinguish retryable from non-retryable errors. Prompt-level instructions alone proved largely ineffective.
How are you actually catching unsafe stuff before an agent runs it, not after?
The author discusses the lack of robust safety enforcement in AI coding agents like Claude Code and Cursor, relying on prompt instructions and manual review, and seeks input on actual pre-execution policy enforcement methods.