How to Layer AI Security Controls
Defense-in-depth for AI agents combines intent verification, contextual policies, runtime enforcement, and network boundaries to block both direct attacks and slow-burn data exfiltration.
CursorDavid Gomes & Travis McPeakAnnouncement
Auto-review governs local agent autonomy as a continuum, allowing routine work to proceed while reviewing actions whose consequences depend on context, user intent, and security stakes. A small classifier agent runs before tool calls in the same RPC stream as the parent agent, and can inspect workspace contents with ReadFile, Grep, Glob, and ListDir when a command alone is insufficient. Its blocks return explanations rather than automatically prompting users, enabling the parent agent to narrow or replace a risky action. Evaluation used 6,122 deduplicated labeled rows from internal developer sessions plus synthetic high-consequence cases, and tested tool use, overrides, parse failures, and behavioral flapping. Early results show the classifier blocks around 4% of reviewed actions, while about 7% of Auto-review chats experience at least one interruption.
Greater agent autonomy can create security risks when local agents access files, credentials, environment variables, MCP tools, or production systems. Frequent permission prompts can also reduce safety because users may stop reading them carefully.
Auto-review uses a contextual classifier agent before tool calls. The classifier evaluates consequence, intent, and security stakes; it can inspect the workspace, runs in the parent agent's RPC stream, and returns explanations on blocks so the parent agent can choose a safer path without immediately interrupting the user.
The classifier is designed to be a small, sufficiently reasoning-capable model; lower-reasoning models were not always faster because struggling with policy or tool calls could consume more time and tokens.
Evaluation combined 6,122 deduplicated labeled rows from roughly 12 hours of internal developer sessions with synthetic cases involving secrets, production data, untrusted instructions, and large side effects.
The classifier currently blocks around 4% of reviewed actions, while about 7% of total chats in Auto-review mode produce at least one user interruption; many blocked actions are resolved by the parent agent.
Summaries are generated from the original by a language model. Check the original before relying on it.
See the idea
Defense-in-depth for AI agents combines intent verification, contextual policies, runtime enforcement, and network boundaries to block both direct attacks and slow-burn data exfiltration.
Keep reading
The Good Stuff
Paid picks we use ourselves. Links carry a referral code — a subscription through one earns us a commission at no extra cost to you.
One useful email. Unsubscribe anytime.