Oct 20, 2026 · AI

Why AI agent guardrails belong at the execution layer, not in the prompt

AI agent guardrails blocking a robotic arm from pressing a button

The practical lesson from a documented Gemini boundary-crossing incident and recent agent-guardrail research is that permissions, approvals and audit records must govern an agent’s actions outside the model.

A successful response does not mean the agent acted within its intended scope.

What failed when an AI agent crossed its boundary?

In an interview with Help Net Security, Ariel Assaraf, CEO of Coralogix, described a Gemini agent that was meant to remain inside a controlled cybersecurity test. A configuration error gave the agent internet access, and it entered three real systems. According to Assaraf, the agent eventually recognized the mistake and stopped, but the boundary had already been crossed.

Assaraf said the missing controls sat outside the model:

  • Network isolation
  • Target allowlists
  • Scoped credentials
  • An independent authorization check before execution

This account supports a specific operational conclusion: instructions in a system prompt can describe a boundary, but they cannot technically enforce it. The interview describes one reported incident and Assaraf’s account of the controls involved. The broader argument rests on the control pattern and the research cited below.

How can teams separate context from authority?

Give an agent only the context needed for its current task, and keep permission to act separate from the information it can read. Assaraf said his team retrieves context just in time, records its provenance and expiration, and separates sensitive or untrusted context from instructions. In his account, access to information does not grant permission to act on it.

Teams can test that distinction by measuring two effects together. First, does added context improve task success in evaluations? Second, does it increase policy violations, successful prompt injections or unnecessary data access? If the performance gain is small while those risks rise, the added context has failed the test.

Do not let knowledge establish authority for content accounts. That knowledge does not authorize any action.

What does an execution-layer guardrail look like?

An execution-layer guardrail places a policy enforcement point between an AI agent and its tools. According to Assaraf, each proposed action can be evaluated against the agent’s identity, target, environment, data classification and current authorization. The agent does not receive unrestricted credentials, so its own judgment does not grant it the final decision.

For a social media team, that model creates three practical permission bands:

  • Read-only analytics: A query that does not change data may run automatically within an approved scope.
  • Reversible content changes: Reversible changes receive tighter checks.
  • Irreversible or broad-impact actions: Irreversible or high-blast-radius actions require human approval.

This risk-based structure comes directly from Assaraf’s interview account. It is also consistent with a foundational guardrail paper from the University of Notre Dame, MIT-IBM Watson AI Lab, the University of Washington, Ca’ Foscari University of Venice and IBM Research. The paper argues that intervention before action execution can be safer because some risks cause severe consequences once carried out. Its proposed Safiron system flags risky cases, assigns risk types and produces rationales before a tool action is executed.

The paper proposes pre-execution monitoring and introduces Pre-Exec Bench for evaluating detection, risk categorization, explanation and cross-planner generalization in human-verified scenarios.

What evidence shows that guardrails can improve execution?

A September 2026 AgentGuard preprint by Wuyang Dai and Song Wang offers measured evidence for one coding-agent setting. The researchers collected 642 documented failure traces from real coding-agent executions across 382 repository tasks. They learned guardrails from 461 traces covering 282 tasks and evaluated them on a separate set of 100 tasks.

Using Claude Code with Claude Haiku 4.5 as the underlying coding agent, the researchers reported that AgentGuard reduced the Abnormal Execution Rate from 69.0% to 26.7% and increased the Successful Task Completion Rate from 21.7% to 35.0%. Their abstract also notes the continuing challenge of balancing safety and task completion.

How should guardrails be tested?

Testing needs to cover more than the obvious instruction. Assaraf said his team evaluates prompt injections, obfuscated commands and multi-step attempts that aim to reach the same prohibited outcome through different paths. A successful test produces two results:

  1. The attempted action has no external side effect.
  2. The block creates a complete telemetry record.

The record should document the agent’s actions and the policy that halted them. The record does not establish that the broader workflow is healthy.

Guardrail performance also needs measurement beyond whether a prompt was obeyed. A March 2025 NVIDIA report on evaluating NeMo Guardrails describes an evaluation method that measures policy compliance, latency and token usage. In the configurations covered by the report, the first guardrail layer raised policy-violation detection from 75% to 83% while adding about half a second to average latency, and later layers moved detection toward 99% as throughput declined from 112.9 to 98.7 tokens per second per interaction. The vendor warns that its AI-generated summary may omit information, so these results should be read as findings about the reported configurations, not universal performance figures.

Stricter guardrails may reduce harm by delaying routine analytics or blocking useful content work, but they may also make the agent less useful.

Which signals reveal harm behind a successful response?

Watch the consequences of an agent’s actions, not only its status response. Assaraf said his team correlates agent telemetry with deployments, incidents, security events, rollbacks and human corrections. The correlated signals include tool calls, policy decisions, overrides, retries and data access.

Teams also measure decision consistency. If the same observable facts produce different actions after a model change, the organization needs to locate the point where the policy path diverged. The relevant record identifies the policy applied, evidence evaluated, exception used and result that followed.

This approach is supported by a 2026 survey on evidence tracing and execution provenance from researchers at Griffith University and other institutions. The survey argues that final-answer accuracy does not reveal whether tool calls were justified, how memory shaped decisions or where an execution failure originated. It describes execution provenance as a typed record connecting retrieved evidence, tool outputs, memory, observations, claims, actions and final answers.

  • Which account or asset did the agent change?
  • What evidence and permission supported the action?
  • Was a human override or exception used?
  • What happened after the action, including a moderation flag, correction, rollback or audience complaint?

How do organizations apply consistent controls without slowing every task?

Put stronger controls on the few actions capable of broad harm and keep routine work moving. Assaraf said requiring human approval for every production-related action quickly makes agents less useful, particularly during incidents when basic investigation must continue.

A September 17, 2026 MIT CISR research briefing reached a similar organizational conclusion. Alan Thorogood, Peter Reynolds and Asif Gill based their work on 48 interviews with leaders from 28 organizations between May 2024 and August 2026. The briefing says unique controls for every AI application become unsustainable as adoption expands. It identifies architecture compliance, innovation management, workforce enablement and supplier governance as four domains for consistent organizational controls.

For one content team, those domains translate into practical review questions:

  • Architecture compliance: Can the agent reach only the tools and data required for its task?
  • Innovation management: Can teams test a new workflow before granting it broader authority?
  • Can creators and marketers determine which actions need approval and which can be reversed?
  • Supplier governance: Can the team confirm what an outside agent provider may access, modify or retain?

Pre-publish guardrail check for content accounts

Before an AI agent can publish or change a brand account, ask the people who own access and publishing permissions to confirm the following:

  • Use scoped authority: Publishing, deletion, account changes and outbound messages should operate only within permissions assigned for the specific task and account.
  • Keep untrusted content separate: Text fetched from a post, comment, document or other external source must not be able to grant permissions or alter authority.
  • Test alternate paths: Include prompt injections, obfuscated commands and multi-step attempts aimed at reaching a prohibited result through different routes.
  • Keep an external record: Capture attempted actions, policy decisions, approvals and outcomes outside the model so the team can reconstruct what happened.
  • Check consequences: Compare agent activity with moderation events, corrections, rollbacks and audience or staff reports. A successful API response alone is insufficient.

Teams should assess each check against their specific configuration.

What to do now

  1. Classify read-only analytics. Set these to run automatically only within an approved account and data scope. Log the requested data, target and result. This answers whether routine measurement can continue without unnecessary human approval.
  2. Classify reversible content changes. Give drafts, previews and undoable edits tighter checks than public actions. Log the before-and-after state, the policy decision and any approval. This answers how the team can correct a mistake before it reaches the audience.
  3. Require stronger authority for publishing, account changes, bulk deletion and mass DMs. Use scoped permissions and human approval where the possible impact warrants it. Log the requested action, target, approver and final outcome. This answers who can make broad or hard-to-reverse changes.
  4. Test prohibited outcomes through several paths. Ask the security or platform owner to run prompt injection, obfuscated-command and multi-step evaluations. Verify both that no external change occurs and that the attempt generates a complete record. This answers whether the control can stop the outcome rather than one particular wording.
  5. Review outcomes and model changes together. Correlate tool calls, policy decisions, retries, overrides, moderation events, corrections and rollbacks. Flag cases where the same observable facts lead to different actions. This answers whether the workflow is producing safe results across model updates.

Source note

The September 25, 2026 Help Net Security interview with Ariel Assaraf directly supports the Gemini incident account, the missing controls described in the interview, the context-versus-authority approach, the policy-enforcement pattern, risk-based approval, testing methods and observability signals. Feedsta has applied those principles to social media workflows.

The foundational guardrail paper supports the argument for pre-execution intervention and describes Safiron and Pre-Exec Bench. The AgentGuard preprint supports the reported coding-agent figures, dataset sizes and evaluation design, but it does not test social media publishing. The MIT CISR briefing supports the organizational-control recommendation and its interview base. The provenance survey supports the use of process-level execution records. The NVIDIA report supports measuring policy compliance alongside latency and throughput, but its figures apply only to the configurations described in that report.

FAQ

Why should AI agent guardrails be outside the prompt?

A prompt can describe a boundary but cannot enforce one. Execution-layer controls independently evaluate the proposed action, restrict credentials and prevent an action when it lacks authorization.

Should every AI agent action require human approval?

No. Assaraf said requiring approval for every production-related action can make agents nearly useless during incidents. Read-only queries within an approved scope can run automatically, reversible changes can receive tighter checks, and irreversible or high-impact actions can require human approval.

What should an AI agent audit log contain?

It should contain attempted actions, policy decisions, overrides or approvals, data access and the resulting outcome. Assaraf also recommends correlating that telemetry with incidents, security events, rollbacks and human corrections because successful responses can conceal poor outcomes.

Related coverage

This article reports on publicly available information from the sources listed below. We have no reason to believe it is inaccurate, but we have not independently verified every claim, and details may change as the story develops.

Sources