AI security · agent harness · Part 1 of 3

The Model Has Preferences. The Harness Has Controls.

Agents will make mistakes, follow malicious instructions, and act faster than humans can supervise. The fix is not a better prompt. It is a hard boundary around the model, and that boundary is the harness.

Usman Chaudhary · Field CISO at Google Cloud · written in a personal capacity, views are my own · October 2026

This is another collaboration between Anton Chuvakin and me. This time we set out to answer one question: is the harness a security boundary? The piece also appears on Anton on Security as "The Model Has Preferences, but the Harness Got Controls - Part 1".

TL;DR

Part 1 article flow: sections 1 to 3, why the model is not enough; sections 4 to 5, the harness boundary; sections 6 to 7, how we secure it.

1The incident: a database gone in nine seconds

Nine seconds. That is how long it took an AI coding agent at PocketOS in late April 2026 to delete the company's production database and take the attached backups offline right alongside it.

What happened, per Railway's technical write-up:

Its own summary afterward was painfully candid:

"I guessed instead of verifying, I ran a destructive action without being asked."

The tempting question is the wrong one.

This post argues that the answer lives in the agent harness, not the model.

2How agents work: model + harness

The most useful mental model for securing AI agents is also the simplest: Agent = Model + Harness.

A model that declines an action is expressing a preference. A harness that will not execute it is enforcing a control. That sentence is the thesis of this post.

None of this is new security philosophy. Least privilege, isolation, identity, and audit logging are decades old. What agents change is where those principles must be enforced and how fast.

Agent equals model plus harness. The model in the center proposes actions; five harness zones (orchestration and tool execution, configuration and dependencies, sandbox and policy gate, identity and credentials, telemetry and audit) permit, block, or constrain them.

Figure 1. Agent = Model + Harness. The model proposes actions; the five harness zones around it permit, block, or constrain them.

3Why the model cannot be the security boundary

Let's be blunt about something the industry keeps dancing around: the model will never be a reliable security boundary, and it is pointless to treat it as one.

Three reasons, none fixable with a better system prompt:

"What about a second model that checks the first?"

Independent guard and reviewer models (Google's Model Armor, Cisco AI Defense, and the reviewer models OpenAI and Anthropic now ship inside their harnesses) are a real risk-reduction layer, and we recommend them. But a reviewer model is still a probabilistic filter, not a final authorization boundary. You have stacked a second set of preferences on top of the first set: Anthropic's own reviewer publishes a 17% false-negative rate across 52 real overeager actions. A useful filter. Not a wall.

The appsec vs. firewall analogy

We have been here before with web applications. Application security (secure coding, input validation, code review) makes the app harder to exploit, but every serious app still ships bugs, so we put runtime boundaries (firewalls, WAFs, OS sandboxes, IAM) around the app to enforce rules it cannot violate even when it is buggy or actively exploited. Agents work the same way:

The harness is the security boundary for the model, exactly as the firewall and sandbox are boundaries for the app: not because the model is bad, but because software fails.

4Defense in depth: model, harness, and gateway

Saying "the harness is the primary execution boundary" does not mean "only the harness matters." In practice, an enterprise running agents relies on three control layers with distinct jobs:

  1. The model (alignment, safety training, refusals). Run by the model vendor to reduce the rate of bad decisions. Probabilistic.
  2. The harness (OS sandbox, tool policy, scoped identity, secrets handling, egress allowlist, approval gates, hooks, telemetry). Shipped by the AI vendor and configured by the customer to constrain all execution, both local and remote.
  3. The enterprise agentic gateway (policy, identity brokering, MCP proxying, DLP, and logging across external model, tool, and data traffic). Run by the enterprise security team to centralize policy and SOC visibility across agents.
Three control layers: model, harness, and enterprise agentic gateway, showing that local actions bypass the gateway.

Figure 2. Three control layers—and why local actions bypass the gateway. The harness mediates every proposed action; the enterprise gateway only sees traffic that leaves the endpoint.

The layers are not interchangeable:

And the harness is the least mature of the three. The model gets the research attention. The gateway is where enterprise vendors (ours included) are converging. The harness sits in the middle: shipped by AI vendors, configured by developers, treated as a productivity plugin, and mostly invisible to security.

If the harness is the execution boundary, it has to be built, configured, and watched like one.

5Where the harness fails today

Once you look at the harness as a security boundary rather than a developer convenience, three specific gaps stand out in how harnesses are deployed today.

1. Approval fatigue and bypass modes (--yolo)

2. Over-privileged credentials and shared identity

3. The harness itself is an unmonitored software attack surface

Harness CVEs and bypasses

Weaponized configs and flags

SOC blindness

The first two gaps are failures to contain what the agent can do. The third is a failure to protect and monitor the harness itself.

6How to secure the harness: three architectural moves

Closing those gaps means doing two jobs at once:

In practice, that comes down to three architectural moves:

Move A · contain

Take enforcement out of the model

Run commands inside an OS sandbox with deterministic tool policy, backed by an independent, reasoning-blind reviewer model for judgment calls (stripped of the actor's chain-of-thought so the agent cannot talk its way past the check), with structured steering on blocked actions and human prompts reserved for irreversible ones.

Move B · contain

Shrink what the agent can reach

Give the agent its own identity, short-lived scoped tokens, secrets kept outside the sandbox, and an egress allowlist, breaking Simon Willison's "lethal trifecta" of private data, untrusted content, and an outbound channel.

Move C · govern

Govern and watch the harness itself

Put agent config files under branch protection, pin MCP dependencies, and stream action telemetry and hooks to the SIEM.

Where harnesses fail and the three moves that fix them: Moves A and B contain what the agent can do; Move C governs the harness itself.

Figure 3. Where harnesses fail—and the three moves that fix them. Moves A and B contain what the agent can do; Move C governs the harness itself.

Each move gets its own deep dive in Part 2.

7What the harness cannot solve

A boundary is only trustworthy if you are honest about where it ends.

  1. Prompt injection at the model layer remains unsolved. That is not a gap in the harness story; it is the premise of it. Every harness control assumes injection can succeed and asks what happens next.
  2. Bugs inside the vendor's harness are the vendor's to fix. Pick vendors who publish advisories and ship fixes fast, and treat harness updates like browser updates.
  3. The endpoint remains the thinnest layer. AI detection and response on developer laptops, where most harnesses actually run, is immature. Cloud-hosted sessions sidestep part of this; local agents do not.

Conclusion and what's next

Strip away the new vocabulary and harness security is least privilege, isolation, identity, and logging, applied to a process that reads untrusted text and acts at machine speed. AI changes the speed of the attack, not the fundamentals of defense.

The model will keep having preferences. The harness is where the controls go, and today it is the least watched layer in the stack.

Coming next:

Got comments? What stands between a coding agent’s bad decision and your production environment today? If the honest answer is “the model’s judgment,” you have a preference in a place where you need a control.