Where should guardrails for AI coding agents actually live?

Reddit r/AI_Agents News

Summary

A discussion on where to place guardrails to prevent AI coding agents from making unauthorized changes, exploring friction points at various stages of the deployment workflow.

I’m trying to figure out how teams are actually keeping AI coding agents on a tight leash. We’ve all been there: you ask an agent to fix a single, isolated bug, and suddenly it’s touching five extra files, refactoring nearby code, and doing completely unapproved work. The standard advice is "just review the diff." But by then, the code is already mangled, tokens are burned, and an engineer has to waste time untangling the mess. If we want to stop this agentic scope creep, where should the guardrail actually live? I've seen teams try putting the friction in a few different places: Pre-run: Strict task contracts before the agent even boots up. During the run: Sandboxing file and terminal access so it physically can't touch other files. Commit time: Git hooks and strict allowlists. Post-work: Catching the mess in CI. Review time: Better PR summaries to speed up human review. In-house: Just trusting the coding-agent platform's internal guardrails. For those of you deploying agents in serious production environments (skip the hype, give me the real workflow pain): What is actually working for you right now? And what tool do you desperately wish existed to solve this?
Original Article

Similar Articles