Human approval for AI agents: how to require approval before DELETE and DROP
6 min read · Updated November 14, 2026
Everyone agrees an AI agent should not delete production data on its own. The question is what counts as a real approval.
What is not an approval
- The agent asking "may I run this?" in the chat and the same person answering "yes".
- A prompt rule saying not to delete anything.
- A warning after the command already ran.
- A confirm button that releases any command, not that command.
In all these cases the credential still allows the execution. The approval is decorative.
Six properties of an approval that protects
- Outside the agent's channel: the decision happens in an authenticated panel, not in the chat, where text can be manipulated.
- Bound to the exact call: approval covers that SQL, with those parameters, in that environment. Change a comma and it is another request.
- Single use and short window: once approved, the call runs once within minutes. It does not open an access window.
- Separation of roles: whoever asks does not approve their own request, unless the company made them an approver for that rule.
- Re-authentication in production: for destructive production operations the approver confirms the password again, even with an open session.
- Full trail: attempt, decision, approval, execution, and result are recorded with names.
What should require approval
Not only DELETE and DROP. Classification should follow the SQL's effect: a DELETE hidden in a CTE, a MERGE that deletes, an ALTER TABLE that drops a column, or a command the classifier does not know also need a person. When in doubt, the safe default is to ask.
What about day-to-day work?
Approval for everything blocks the team and becomes a rubber stamp. The point is a limit per person: queries and writes the person could already run proceed immediately. Only what goes past their limit becomes a request. When the team needs a planned window, the admin can grant a specific scope in advance, with a start and an end.
How GatekeeperID Agents applies this
- The Connector classifies SQL by effect and blocks what goes past the limit before it reaches the database.
- The request goes to the person's lead and, in production, to the environment approvers as well.
- Approval happens in the panel, with the password again in production, and creates a single-use authorization bound to the call's fingerprint.
- The same call runs once. Everything stays in the audit for 90 days.
Real approval for your team's agents
See a DELETE blocked, approved in the panel, and run exactly once.
Book a 20-minute demoQuestions about this guide
Who approves requests?
The company decides: each team has a decider, and each environment can have extra approvers. In production, destructive operations need every required approver.
Does the approver see the data that will be deleted?
They see the operation, table, environment, who asked, and why. Literal values in the SQL are masked so the request does not expose personal data.
What if nobody approves?
The request expires within 24 hours and execution stays blocked. There is no approval by default.
More guides
How to connect Cursor to PostgreSQL safely
The usual way to connect Cursor to PostgreSQL puts the database password on a laptop. See the risks, what to do with PostgreSQL alone, and how to give each person a limit without handing out the password.
Claude on your database: how to limit what the agent can do
Claude Code and Claude Desktop reach PostgreSQL over MCP with whatever credential you give them. See how to set it up without handing out the password and how to stop a request from becoming a DELETE without approval.
LGPD and AI agents on your database: what changes and how to control it
When an AI agent queries personal data in your PostgreSQL, Brazil's LGPD still applies. See the principles that matter most, the practical risks, and the controls that produce evidence.
