❌

Normal view

The Model Has Preferences, but the Harness Got Controls - Part 1

26 October 2026 at 23:14

The Model Has Preferences. The Harness Has Controls.

This is another collaboration between Usman Chaudhary and myself (his version); this time we decided to explore the mystery of β€œis harness a security boundary?”

Part 1 of 3 on securing agents. The theme here is: we think that despite alignment efforts, models will make mistakes. The fix is not a better prompt or more more more alignment work. The fix includes a hard boundary around the model, and that boundary is the harness, in someΒ cases.

TL;DR

  • Agent = Model + Harness. The model reasons and expresses preferences. The harness executes, and it is the primary execution boundary between model intent and real-world action.
  • The model cannot be the security boundary. It is non-deterministic, it treats untrusted text as instructions, and it cannot police itself. A second β€œguard” model is a useful filter, not aΒ wall.
  • The harness is the boundary, the way a firewall and OS sandbox are boundaries for an application. It sits between the model and the enterprise gateway, and today it is the least mature and least watched layer in theΒ stack.
  • Fixing it requires two things: controlling what the agent can do through the harness (sandbox [which nobody should trust as a sole security boundary!], narrow identity, egress allowlists) and securing the harness itself as production software (configs, dependencies, and SIEM telemetry). This would be annoying to hear forΒ some.

1. The 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:

  • The agent hit a credential mismatch and went looking for aΒ fix.
  • It found a cloud API token that let it do far more than fix anything.
  • It deleted the production database volume and made the attached snapshots unavailableβ€Šβ€”β€Šleaving PocketOS with three-month-old backups and a 60-hour recovery.

Its own summary afterward was painfully candid, for a 2026Β AI:

β€œI guessed instead of verifying, I ran a destructive action without beingΒ asked.”

The tempting question is the wrongΒ one.

  • ❌ Why did the model make a bad decision? Models will make bad decisions. Humans do too, and we have spent decades building controls that assume exactly that. β€œAI as insider” thinking works wellΒ here.
  • βœ… Why was a bad decision allowed to become an irreversible action? This to us shows lack of security engineering, not β€œOMG is AI evil or what?” lamentations.

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

2. How Agents Work: Model +Β Harness

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

  • The model reasons. It is probabilistic. It predicts tokens, plans steps, and expresses preferences. It can be persuaded, confused, andΒ tricked.
  • The harness executes. It is everything that turns reasoning into action: the agent loop, shell and tool executors, MCP servers, repo config files, approval prompts, the OS sandbox, and (crucially) the credentials the agent runs with. Claude Code, Cursor, Codex CLI, Gemini CLI, and GitHub Copilot’s agent mode are all harnesses.

πŸ‘‰ 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.

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

3. Why 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:

  • It is non-deterministic. The same input can produce a different action tomorrow. A boundary that holds 97% of the time is not a boundary; it is a statistic [I think Claude said this, sounds like itΒ :-)]. Security boundaries are supposed to be boring and repeatable, not fun and adventurous.
  • It consumes untrusted text as instructions. Agents read attacker-controlled text all day in READMEs, issues, PR comments, web pages, and tool descriptions, and models fail to reliably separate retrieved data from instructions. The UK NCSC calls LLMs β€œinherently confusable”; OpenAI and Google both say prompt injection is β€œunlikely to ever be fully β€˜solved’”. Model refusals help [as long as they reject attackers, not defenders, duh!], but they do not hold: in the Nx supply-chain attack, guardrails rejected roughly a quarter of Claude invocations and the attack still succeeded.
  • It cannot police itself (self-review). Asking the actor model whether its own next action is safe is asking the suspect to run the investigation. And you do not need a rogue-AI scenario to see the risk: well-intentioned agents have already wiped production databases at Replit during a declared code freeze and at PocketOS, simply because their judgment failed and their blast radius was too wide. Maybe in the future it will, but not itΒ cannot.

β€œWhat about a second model that checks the first?” Simple, beautiful, β€œsecure” model,Β right?

Independent guard and reviewer models (Google’s Model Armor and the reviewer models OpenAI and Anthropic now ship inside their harnesses, as do many other security vendors) 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, but not a wall, and not β€œa security invariant” forΒ sure.

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:

  • Model alignment, safety training, and prompting β‰ˆ agent β€œappsec”/modelsec (fewer bad decisions, neverΒ zero).
  • The harness β‰ˆ runtime enforcement (sandbox [usually porous], tool policy, and IAM that keep bad decisions from becoming irreversible actions).

πŸ‘‰ 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.

4. Defense 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.
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:

  • ❌ A gateway does not see local endpoint execution. If a harness runs as the developer withβ€Šβ€”β€Šdangerously-skip-permissions, the gateway never sees a local rm -rf or secret read on aΒ laptop.
  • ❌ A harness alone does not give the SOC a cross-team controlΒ plane.

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.

BTW, one of us (Anton) will revisit defense in depth in the age of AI soon (this is one forΒ cloud).

πŸ‘‰ If the harness is the execution boundary, it has to be built, configured, and watched likeΒ one.

5. Where 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)

  • A coding agent makes hundreds of tool calls in a single session. Ask a human to approve each one at machine speed and they stop reading within the hour: Anthropic measured users approving 93% of permission prompts before it introduced auto mode. A control that everyone clicks through is not aΒ control.
  • When friction gets too high, developers turn it off, and most major coding-agent harnesses expose an explicit bypass mode for exactly that (β€Šβ€”β€Šdangerously-skip-permissions in Claude Code,β€Šβ€”β€Šyolo in Gemini CLI andΒ Codex).

2. Over-privileged credentials and sharedΒ identity

  • Today, local harnesses typically inherit the developer’s ambient git keys, cloud tokens, and MCP connections into Slack, GitHub, and production consoles.
  • Unless sessions carry a separate agent identity, the agent’s blast radius equals the human’sβ€Šβ€”β€Šand the SOC cannot easily tell human and agentΒ apart.

3. The harness itself is an unmonitored software attackΒ surface

Harness CVEs andΒ bypasses

  • Cursor’s MCPoison bound trust to a server’s name rather than its contents (Tenable).
  • A GitHub Copilot exploit used prompt injection to flip on its own auto-approve setting (Embrace TheΒ Red).
  • Even actively maintained harnesses ship bugs fast: Anthropic’s claude-code repository lists more than 30 security advisories.

Weaponized configs andΒ flags

  • Agent config files are executable. In June 2026, the Miasma worm planted malicious configs across 73 Microsoft repositories that ran on open. No CVE required.
  • In the Nx attack, which leaked 2,000+ verified secrets, the malware invoked victims’ own AI CLIs with bypass flags to do its reconnaissance.

SOC blindness

  • Harness telemetry is opt-in and redacts prompts and tool arguments by default (Elastic SecurityΒ Labs).
  • Copilot’s audit log omits local prompts entirely (GitHub).
  • Raw chain-of-thought is never released to customers (Anthropic).

πŸ‘‰ 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.

6. How to Secure the Harness: Three Architectural Moves

Closing those gaps means doing two jobs atΒ once:

  • Controlling what the agent can do (security within the harness): enforcing hard limits on execution and reach so a bad model decision cannot become a catastrophe.
  • Protecting the boundary itself (security for the harness): governing the harness’s code, configs, dependencies, and telemetry. A firewall with a remote code execution bug is not a boundary; neither is a harness whose config file can be rewritten by aΒ README.

In practice, that comes down to three architectural moves:

  • Move A: 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: 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 and watch the harness itself. Put agent config files under branch protection, pin MCP dependencies, and stream action telemetry and hooks to theΒ SIEM.
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 (hopefully!)

7. What the Harness Cannot SolveΒ (Ever?)

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.

In other words, if you endpoints are owned, you need better host security, not β€œunbeatable” AI security (translation: it will get beatenΒ anyway)

Conclusion & 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 (hopefully!):

  • Part 2: Three moves to secure the harness. Moves A, B, and C in detail: OS sandboxing and reviewer models (with the error and prompt-reduction rates vendors have published); dedicated identity, scoped tokens, and egress allowlists that break the lethal trifecta; and agent config as code, pinned MCP dependencies, and action telemetry in theΒ SIEM.
  • Part 3: Nobody owns the whole problem. The shared-responsibility split between model providers and enterprises, which vendors ship which control today, the prerequisites that have to be true first, and five actions for thisΒ quarter.

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.

P.S. This blog is ended up being very overengineered, but you can forgive us for this perhapsΒ :-)


The Model Has Preferences, but the Harness Got Controls - Part 1 was originally published in Anton on Security on Medium, where people are continuing the conversation by highlighting and responding to this story.

Cloudflare ziet 'miljoenen' PHP2Shell-misbruikpogingen sinds bekendmaking

22 October 2026 at 16:11
Cloudflare ziet inmiddels miljoenen pogingen om de PHP2Shell-kwetsbaarheden te misbruiken op zijn netwerk. Dat meldt ceo Matthew Prince. In de uren voor de bekendmaking werden al pogingen gedaan, en dat aantal is sindsdien alleen maar gegroeid.

Modden van Nintendo Switch 2-games lijkt mogelijk door ns2jb-exploit

22 October 2026 at 15:52
Een hacker heeft een softwarematige exploit ontdekt voor de Nintendo Switch 2. Hiermee kunnen hackers naar verluidt code uitvoeren op hun console en zo bijvoorbeeld games modden. Dit is een belangrijke stap naar een volledige jailbreak, hoewel daar nog wel een kernelexploit voor nodig is.

Amazon: hackers probeerden PHP-lekken al 4 dagen voor bekendmaking te misbruiken

22 October 2026 at 15:47
De PHP2Shell-lekken waardoor woensdag veel websites preventief offline gingen, deden mogelijk al langer de ronde. Amazon zag op 17 oktober al pogingen om de lekken te misbruiken, vier dagen voordat ze bekend werden gemaakt.

Indurex Raises $8 Million to Expand Industrial Cybersecurity Platform

22 October 2026 at 15:00

The Amsterdam-based company plans to use the funding for research and development and commercial expansion in Europe and the Middle East.

The post Indurex Raises $8 Million to Expand Industrial Cybersecurity Platform appeared first on SecurityWeek.

Apple voegt volgende week Apple Pencil-ondersteuning toe aan iPhone Duo

22 October 2026 at 14:53
Apple voegt Apple Pencil-ondersteuning binnenkort toe aan de vouwbare iPhone Duo. De fabrikant voegt die ondersteuning toe met iOS-versie 27.2, die nu als testversie te downloaden is. Naar verwachting komt de update volgende week algemeen beschikbaar.

GitLab dicht 12 jaar oud gat dat een 10 scoort op de CVSS-securityschaal

22 October 2026 at 14:45
GitLab bracht woensdag patches uit voor een kwetsbaarheid die al sinds 2014 in de code zit en die de hoogste score krijgt binnen het CVSS. Deze updates volgen net iets meer dan een week na kritieke patches voor GitLab. Gebruikers die deze ontwikkelsoftware zelf draaien, moeten snel updaten.

Nvidia DGX Station-pc met Windows verschijnt in december vanaf 100.000 euro

22 October 2026 at 14:25
De eerste Nvidia DGX Station-pc's met Windows 11 verschijnen in december. De prijzen variΓ«ren van 100.000 tot 150.000 euro, afhankelijk van de configuratie. De systemen hebben zeker 748GB gedeeld geheugen en zijn bedoeld voor enterprisegebruik.

Anthropic komt met Claude Duet-agent als antwoord op OpenAI Dots en Meta's Muse

22 October 2026 at 13:44
Anthropic komt met Claude Duet, een AI-agent die actief allerlei taken kan uitvoeren. Het bedrijf gaat daarmee de concurrentie aan met Meta's Muse-app en OpenAI's Dots. Claude Duet komt vooralsnog alleen als preview beschikbaar voor betalende gebruikers in de Verenigde Staten.
❌