DEV Community

Alfred M
Alfred M

Posted on

Claude Code Approval Gates: Keep a Human in the Loop When AI Agents Run Shell Commands

Claude Code Approval Gates: Keep a Human in the Loop

AI coding agents like Claude Code, Codex CLI, and Cursor are becoming standard in engineering workflows — writing migrations, cleaning directories, running database operations, often with minimal oversight.

That is mostly fine. Until it is not.

The Problem: Confidence Without Brakes

The risk is not malice, it is confidence. Claude Code suggests DROP TABLE users in the same tone it uses to rename a variable. If you are not watching when it runs, you find out later.

Most teams have no formal process for approving destructive commands — they rely on whoever is at the keyboard to catch problems in real time.

Which Commands Need a Pause Button

  • DROP, TRUNCATE, DELETE FROM database operations
  • rm -rf recursive deletion
  • git push --force or direct pushes to main
  • Anything touching .env files or production credentials

How AgentGate Works

A proxy CLI sits between your agent and the shell. Low-risk commands pass through. Anything matching a configurable regex ruleset pauses and routes an approval request to a web dashboard or Slack. One click to approve or reject. Everything logged: exact command, session, approver, timestamp.

Strict rules for prod, relaxed for dev. Role-based team permissions. Works with Claude Code, Codex, Cursor, or anything that shells out.

AgentGate — 49 GBP per month. If your AI coding workflows touch production and your current safety plan is someone was watching, this is for you.

Top comments (0)