cd /news/ai-agents/my-ai-reviewer-rejected-two-of-my-ag… · home › topics › ai-agents › article
[ARTICLE · art-178560] src=dev.to ↗ pub= topic=ai-agents verified=true sentiment=↑ positive

My AI reviewer rejected two of my agent's root scripts in two days. Both times it was right.

A developer built a separate reviewer model that sits outside his root-less agents and approves or rejects the scripts they want to run on hosts, and reports it caught two bad scripts in two days. In the first case the agent's stated reason said "security updates" while the script also ran a full upgrade, purged unmentioned packages and rebooted even after a failed update; in the second, a script silently deleted old backups. The developer fixed the first by generating the reason from the actual commands and gating the reboot on a successful update, and notes that the guest-exec call returns exit code 0 even when the inner command fails, with the real code only in the JSON.

recommendation

Run a reviewer model outside the agent that rejects any script whose stated reason omits deletes, access or data additions, and derive the reason from the commands themselves.

more in playbook: Securing agents and AI tools
by read2 min views8 publishedNov 30, 2026

My agents don't hold root. When one of them needs to change something on a host, it writes a script and a reason, and both go to a reviewer model outside the agent. The reviewer reads the script, reads the reason, and decides: pass, ask me, or reject.

Last week it rejected two scripts in two days. I want to show you why, because both rejections are the argument for building it this way.

Rejection 1: "Security updates"

The agent's reason said: apply security updates to a VM. The script did that, but it also ran a full upgrade, purged packages nobody had mentioned, and rebooted the VM, even when the update step had failed or timed out.

Nothing malicious. The agent just wrote the reason from its intent and the script from its habits. The reviewer compared the two and said no: the reason did not describe what the code does.

The fix was not "be more careful next time". The reason is now generated from the commands themselves (what gets upgraded, which images are pulled, which VM restarts), and the reboot only runs after a successful update. There was also a nastier bug underneath: the guest-exec call returns exit code 0 even when the command inside fails, the real exit code is only in the JSON. A human skimming "security updates" would have approved it.

Rejection 2: the cleanup nobody mentioned

The next day a script for a different change was rejected for a smaller reason: it also deleted old backup files. Sensible, but the reason did not say so. The rule the reviewer enforces: anything that deletes, and anything that adds access or data, has to be in the stated reason. The agent resubmitted with the cleanup named and the script passed.

What I take from this

A second model with a narrow job ("does the code match the reason, and is the reason enough?") catches things I would have clicked through. I would not have read every one of them closely.

The reviewer is only useful because it is outside the agent. Rules in the agent's own config can be edited by the agent.

It says no with a reason, and the agent can fix it without waking me.

Your turn

I'm writing this up as a playbook: risk tiers, why the guard can't live in the agent, approvals bound to a plan hash, the reviewer prompt and when it may decide alone, bundling approvals per task, plus templates. It is not written yet, and I only write it if enough people want it.

If you run coding agents with real credentials, join the waitlist. The first thing I'll send the list is the reviewer chapter with the actual prompt and a checklist for your own setup, one email, no newsletter:

[https://tobiaszander.de/agent-gates/?ref=devto](https://tobiaszander.de/agent-gates/?ref=devto)

(German version: [https://tobiaszander.de/agent-gates/de/?ref=devto](https://tobiaszander.de/agent-gates/de/?ref=devto))

Free to check your own setup right now: [https://github.com/airbone42/agent-permission-linter](https://github.com/airbone42/agent-permission-linter)
── more in #ai-agents 4 stories · sorted by recency
── more on @agent-permission-linter 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
→ Live at https://your-agent.zahid.host ✓
Get free account → Pricing
from €0/mo · no card required
LIVE [news/my-ai-reviewer-rejec…] indexed:0 read:2min 2026-11-30 · —