DEV Community

AsterXing
AsterXing

Posted on

3 deployment gates I now use before letting an AI coding agent touch production

I’m seeing more teams move from “AI can write code” to “AI can change real systems.” That second step is where most of the avoidable damage happens.

After a few messy experiments, I now use three simple deployment gates before letting an AI coding agent touch anything production-adjacent.

1) Scope gate: can the task fail small?

If the failure radius is unclear, the agent should not run with write access.

My quick check:

  • Can I name the exact files, services, or environments it may touch?
  • Is there a clean rollback path?
  • Would a wrong action stay local, or cascade?

If I can’t answer those in two minutes, the task gets downgraded to draft-only or read-only.

2) Evidence gate: what proof must exist before merge or deploy?

A lot of “agent worked” claims are really “the tool returned success.” That’s not evidence.

For each task I now ask for concrete proof:

  • test output
  • diff summary
  • screenshot or URL for UI changes
  • exact command results
  • explicit note about what was not verified

This sounds obvious, but it cuts out a huge amount of false confidence.

3) Cost gate: what is the maximum token/tool spend for this run?

Runaway loops are not just reliability bugs; they are budget bugs.

I put a ceiling on:

  • total turns
  • total model spend
  • retries per failing step
  • tool classes allowed in the session

Cheap guardrails beat heroic postmortems.

The practical rule

If a task can break prod, spend money indefinitely, or silently fake success, it should pass all three gates before autonomy expands.

I’m curious what others are using here. Do you have a preflight checklist for coding agents, or are you relying more on sandboxing plus human review?

Top comments (0)