Harden.run Beats GPT5.5-xhigh on Agent Guards

By Rogier Muller08.28.26
Harden.run Beats GPT5.5-xhigh on Agent Guards

Harden.run published a Show HN research and product post titled "Beating GPT5.5-xhigh for Coding agent security with SLMs and IRM" about guarding AI coding agents while they write and run code. The awkward security problem that coding agents can edit files, call tools, touch terminals, and sometimes reach services you did not mean to expose. Agent safety needs runtime boundaries and reviewable evidence, not just a smarter model reading a prompt. Inline reference monitoring is a technique that checks program behavior while it runs, so the guard can respond to actions instead of only reviewing intent.

The claim that caught developers’ attention was not “we prompted a bigger model better.” Harden.run says it post-trained a cybersecurity small language model, changed how it reasons, and paired it with program-analysis controls such as inline reference monitoring, or IRM. As of August 2026, the post says that combination outperformed GPT5.5-xhigh on difficult coding-agent security benchmarks including LinuxArena and SleightBench. For Cursor users working through agentic coding and AI coding governance questions, that is a useful shape of answer: make the agent’s boundary observable at the place where work happens.

Follow the action, not just the chat

The interesting part of Harden.run’s post is the shift from “is this response safe?” to “what is the agent actually doing?” That matters because a coding agent can produce harmless-looking text while preparing a risky action in the repo or terminal.

A normal Cursor workflow makes this concrete. You ask the agent to “clean up the local dev database reset script.” The chat is ordinary. The dangerous part is whether the agent edits scripts/reset-db.ts, calls a shell command, or points an MCP server at production credentials.

This is why red-teaming alone feels incomplete. Red-team prompts can find failures, but they do not automatically create a durable control around file writes, shell commands, network access, or database mutations. Don't treat a good transcript as proof that the next tool call is safe.

Harden.run’s SLM angle is also practical. A small language model is cheaper to run often, which makes it a better candidate for repeated security checks than a large model used only at review time. The hard part, as some developers pointed out in the discussion around the post is auditability: you still need to know why the guard allowed something, and whether multiple agents are coordinating behavior across separate calls.

See why agent guards are harder than code review

Code review usually sees a patch. Agent guards need to see a patch, a tool call, a filesystem operation, and sometimes an external system request.

Imagine an agent working in a payments service:

  • It adds a migration that drops and recreates a table.
  • It updates a seed script to write test data.
  • It runs a terminal command to verify the change.
  • It asks an MCP server for current customer-like records.

Each step might look reasonable alone. Together, they can cross a boundary the developer never intended. That is the security shape Harden.run is pointing at: coding agents craft arbitrary code, and arbitrary code can create new behavior faster than a reviewer can manually model it.

This is also where Cursor’s reviewable IDE workflow helps. You can inspect diffs, pin local rules, and make the agent work inside a repository rather than a blank chat box. But an IDE workflow is not a security boundary by itself. It needs explicit rules about what may be read, written, executed, and connected.

The related lesson from Code Review Habits for AI Code is boring in the best way: review the generated change as software, not as a conversation. Harden.run’s post pushes that one layer lower. Review the action path too.

Put the smallest boundary near the repo

The practical move is not to wait for one universal agent-security answer. Put a small, local boundary near the repo today, then let stronger monitors sit behind it when you have them.

For Cursor users, that boundary usually starts with rules and review habits. A rule can tell the agent which files are sensitive, which commands require human confirmation, and which data sources are off-limits. It will not replace Harden.run-style monitoring, but it gives the agent less room to improvise.

Use an AGENTS.md boundary when the rule should be visible to every coding agent that enters the repo. Use a Cursor rule when you want IDE-native guidance that stays close to the files being edited. Keep both short. A long policy document is easy for humans to admire and agents to blur.

Here is a lightweight example for a service with a local database, migrations, and one MCP-backed internal docs server:

---
description: Security boundary for agent edits in this repository
globs:
  - "**/*"
alwaysApply: true
---

# Agent security boundary

- Do not run destructive commands such as `rm -rf`, `dropdb`, `DROP TABLE`, or schema reset commands without explicit human approval in the chat.
- Treat `.env*`, credential files, production config, customer exports, and database dumps as read-protected unless the task explicitly names them.
- Do not modify migration files and run migration commands in the same step. First propose the migration diff, then wait for review.
- MCP tools may be used for documentation lookup only. Do not use MCP tools to fetch customer data, secrets, tokens, or production records.
- Before finishing, list every shell command run and every file outside the requested area that changed.

Don't make the boundary sound absolute. A repo rule can guide an agent and improve review. It cannot prove that every action was safe, detect every coordinated multi-agent attack, or explain a monitor’s hidden reasoning. That is exactly where the Harden.run work is interesting: it explores controls closer to runtime behavior.

Try it safely before you trust it

Use this as a small experiment, not a belief system. Pick one repo where an agent can do useful work but should not have broad authority.

Risk before you copy this Minimal boundary to add What to review
Agent rewrites a migration and runs it immediately Require migration diff review before execution Changed migration files, command history, local DB state
Agent reads secrets while debugging Mark .env*, dumps, tokens, and production config as protected File reads mentioned in final summary and unexpected diff context
Agent uses MCP too broadly Restrict the mcp server to docs or read-only lookups Tool-call transcript and whether the data source was necessary
Agent chains safe steps into a risky outcome Ask for a final action log, not just a summary Commands run, files touched, services contacted

A good test task is something real but reversible: update a validation rule, add a unit test, or refactor a local-only script. Avoid the tempting demo where the agent has full database power. That only proves the agent can move fast, which you already knew.

This sits naturally inside AI coding governance, but the point is smaller than a program. Give the agent one job, one repo boundary, and one review receipt.

Further reading

Start with one guarded task

Pick one repo task that is useful, reversible, and slightly security-sensitive. Add the boundary rule, run the agent, and review the action log before you decide how much more freedom it deserves.