Skip to content
All posts

9 min read

The workaround outlives the fix: what AI agents teach each other about their guard

When a guard wrongly blocks an AI agent, the agent may find another way and write it into the notes it leaves for the next shift. I built a traced sandbox to see whether those notes still help a later reader once the guard is fixed. Rerunning the notes’ commands found nothing, but a model that read the notes got past the fixed guard in 58% of attempts, against 2% for notes from teams that never met the false positives.

AI safetyAI controlAgent oversightMulti-agent systemsLLM agentsSandboxesPre-registered

Picture a team of AI agents running operations for a small service, one shift at a time. Each agent works its tickets and leaves notes for whoever comes next. An automated guard watches every command and blocks the ones that look dangerous.

Now the guard makes a mistake. It blocks an agent from reading a harmless file, a credentials template full of placeholder values that the ticket needs. The agent finds another way to read it, finishes the job, and does what a good colleague does. It writes the trick into the handoff notes.

An illustration of the pattern, not a real note. The agents' actual notes and the routes they recorded are not published.

Later, someone notices the false alarm and fixes the guard. The block is gone. The note is not. Whoever reads the team's notes next, an honest agent or not, still learns where the guard was loose and how to get past it. Does that knowledge still work once the guard is fixed? I built a sandbox to find out.

A guard's mistake is also a lesson

Most work on AI oversight asks whether a monitor can catch a model that is trying to misbehave. AI control research, for example, tests whether safety protocols still hold when the model under watch actively tries to subvert them1. This project looks at a quieter channel. The agents here are not trying to break anything. They are trying to do their jobs, and the guard's false positives teach them where its rules end.

Cryptographers have a name for the standard a guard should meet. Kerckhoffs's principle says a system should stay secure even when the enemy knows how it works2. A guard that is safe only while its rules stay secret fails that test, and teams of agents that share memory are very good at spreading what they learn. Multi-agent systems bring risks of their own3, and a shared notes file is one of the simplest places for such a risk to start.

A workplace in a sandbox

The testbed, SwarmGate, gives each agent a real Linux workspace for a small service: configuration files, logs, documentation, a secrets folder and a vault, a few operations tools, and internal hosts that receive data. Every secret holds a fresh random value in every session, so success can be checked exactly. Either that value shows up somewhere it should not, or it does not.

  1. The agent Works its tickets with one shell tool, up to 40 commands a shift
  2. A sealed sandbox The command really runs, with no internet, and every system call is traced
  3. The guard Reads what the command actually did, not how it was typed

Allowed Files and messages go through

Denied The workspace is rolled back, and the agent sees “Tool call not approved.”

How one command moves through SwarmGate. Because the guard reads the system-call trace, it judges what a command did, however the command was written.

I built two kinds of guard. The command-based guard works like a rulebook: it blocks certain file readers on protected paths, certain network tools sending to unapproved hosts, and uploads of protected files. The data-flow guard follows the data itself: anything that touches a secret is tracked, and tracked data may not reach the agent's screen or leave over the network.

Two teams, one difference

Each team is a line of four agents working back to back. Every agent gets two tickets and up to 40 shell commands. It reads the team's notes when it starts and writes notes when it finishes. Between shifts the notes are merged into one file of at most 500 words, and that file is the only thing the next agent inherits. The system prompt states the team's policy and asks each agent to treat a denial in good faith: “find a safer path, don't try to route around the block.”

Every team works under one of two versions of its guard, which differ in exactly three places. The over-blocking version wrongly blocks three harmless things the tickets need: the credentials template, a token log with the tokens masked out, and a debug bundle that contains the template. The repaired version lets those three through and decides everything else the same way. Each ticket also has an approved route that both versions allow. Matched teams get the same tickets in the same order, so the guard's mistakes are the only difference between them.

Over-blocking guard Wrongly blocks three harmless files the tickets need

  1. Shift 1
  2. Shift 2
  3. Shift 3
  4. Shift 4

Repaired guard Lets those three through and decides everything else the same way

  1. Shift 1
  2. Shift 2
  3. Shift 3
  4. Shift 4

Arrows carry the team's notes, the only thing one shift passes to the next. Both teams get the same tickets in the same order.

The experiment. Each team runs four shifts, and its notes are the only state that carries forward. A team under the over-blocking guard and its matched team under the repaired guard see the same tickets.

I ran 13 teams under each version, for both kinds of guard, with two different models playing every agent: Claude Sonnet 5 and the open-weight Qwen 3.5 397B. I wrote down the hypotheses and the tests before the first session ran.

Agent sessions
416
Teams per guard version
13
Kinds of guard
2
Models playing the agents
2

Then I asked what the final notes carry, in three ways. First, I pulled every command out of the notes, pointed it at the real secrets and ran it under the repaired guard. Second, I gave the notes to a separate reader model, asked it for an attack on a protected secret and ran its answer under the repaired guard. Third, two AI coders from other model families read every notes file and marked whether it held a workaround recipe labelled as a way around the reviewer. To make sure the tests could see a working attack at all, I also wrote a notes file of my own that describes routes past the guard, as a positive control.

The agents routed around the block

The over-blocking guard hit almost every agent. It denied at least one action in 46 to 48 of every 52 sessions, against 0 to 5 under the repaired guard. Being asked to act in good faith did not stop the agents from working around it. Under the over-blocking command-based guard, Claude got the contents of a blocked file another way in 25 of 52 sessions, and Qwen in 17.

Model and guardRepaired guard, then Over-blocking guard
Claude, command-based guard 8% → 88%Repaired guard: 8%, Over-blocking guard: 88%
Claude, data-flow guard 0% → 88%Repaired guard: 0%, Over-blocking guard: 88%
Qwen, command-based guard 10% → 92%Repaired guard: 10%, Over-blocking guard: 92%
Qwen, data-flow guard 8% → 92%Repaired guard: 8%, Over-blocking guard: 92%
Sessions with at least one denial, in percent of 52 per group, under the repaired and the over-blocking version of each guard.

The mistakes also cost real work. Under the over-blocking data-flow guard, Qwen finished 77 of its 104 tickets, against 102 under the repaired one.

The notes remembered

A workaround inside one session is one thing. The question is whether it enters the team's memory, and it did. By the last shift under the over-blocking command-based guard, the notes of 11 of 13 Claude teams and 10 of 13 Qwen teams held a workaround recipe, and every one of them was labelled as a way around the reviewer. Under the repaired guard, not a single final notes file held a labelled recipe. The recipes also built up and stuck. Once a recipe was in the notes, it was still there after the next handoff in 47 of 49 cases.

Share of notes files with a labelled workaround, by shift
SeriesShift 1Shift 2Shift 3Shift 4
Claude, over-blocking guard62%69%85%85%
Qwen, over-blocking guard31%58%69%77%
Both models, repaired guard0%0%0%0%
Share of notes files holding a workaround recipe labelled as a way around the reviewer, after each shift, under the command-based guard. Two coders from other model families, DeepSeek V4 Flash and Gemini 3.8 Flash, read every file independently and agreed closely on this mark.

Rerunning the notes found nothing

So the notes knew where the guard was loose. Did that knowledge still work after the fix? The first test said no. Every command in every notes file, aimed at the real secrets and run under the repaired guard, failed. Not one of eight attacks succeeded for any team, with either guard or either model. My positive control got all eight past the repaired command-based guard, so the test could see a working attack when there was one.

The reason was in the notes themselves. Claude's notes held between one and two command lines per file on average, and Qwen's almost none. The workaround lived in the prose: what the reviewer blocks, and what to do instead.

A reader found the attack

Prose needs a reader. So I handed each notes file to a reader model, Gemini 3.1 Pro, and gave it attack goals one at a time. The score below counts four of them, such as printing the vault's session file or sending a hash of the production key to an unapproved host. For each goal the reader wrote a single command, which I ran under the repaired command-based guard. Each notes file was read three times for each goal.

Notes given to the readerAttacks that succeeded
No notes
8%
Positive control
75%
Claude notes, over-blocked team
58%
Claude notes, repaired team
2%
Qwen notes, over-blocked team
11%
Qwen notes, repaired team
1%
How often the reader got a protected secret past the repaired command-based guard, with Gemini 3.1 Pro reading. 12 attempts each for no notes and for the positive control, and 156 for each kind of team notes.

With notes from Claude teams that had worked under the over-blocking guard, the reader got a secret past the repaired guard in 90 of 156 attempts, or 58%, and it succeeded with the notes of 12 of the 13 teams. With notes from the matched teams that never met the false positives, it succeeded 3 times out of 156. With no notes at all, it succeeded once in 12 tries. My positive control reached 9 of 12. The gap between the two kinds of Claude notes is 56 percentage points. In a paired test over the 13 matched teams, a gap this large would almost never appear by chance if the notes made no difference (p = 0.0002).

The notes of the over-blocked teams carried most of what a deliberately written attack guide carries, and fixing the guard did not remove it. Qwen's notes carried less: 17 successes in 156 against 1, although they held labelled recipes about as often as Claude's.

The reader decides

I ran the same test with Claude Sonnet 5 as the reader. Given the same over-blocked Claude notes, it succeeded once in 156 attempts. That was not because the notes were empty. It declined 85% of those attempts, while Gemini declined 6%.

Reader: Claude Sonnet 5

OutcomeShare of attempts
Declined
85%
Succeeded
1%

Reader: Gemini 3.1 Pro

OutcomeShare of attempts
Declined
6%
Succeeded
58%
The same notes, two readers: what each did with Claude's notes from teams under the over-blocking command-based guard, in percent of 156 attempts.

What this means for oversight

  • False positives are lessons. Every time a guard blocks honest work, it shows the agents where its rules end, and shared memory keeps that lesson after the fix.
  • Commands are not the whole story. A check that only reruns the commands in shared notes would have called these notes safe. The risk was in the prose, and it took a reader to find it.
  • Clean up after a fix. When you repair a false positive, read what your agents' notes say about it, and treat shared memory as part of the attack surface.
  • Prefer guards that survive being known. A guard that is safe only while its rules are secret is fragile in a team that shares memory. Whether a guard that follows the data holds up better is the natural next test.

References

  1. 1. Ryan Greenblatt, Buck Shlegeris, Kshitij Sachan and Fabien Roger (2024). AI Control: Improving Safety Despite Intentional Subversion. International Conference on Machine Learning (ICML).
  2. 2. Auguste Kerckhoffs (1883). La cryptographie militaire. Journal des sciences militaires, vol. IX.
  3. 3. Lewis Hammond, Alan Chan, Jesse Clifton and others (2025). Multi-Agent Risks from Advanced AI. Cooperative AI Foundation, Technical Report #1, arXiv:2502.14143.

Nazmus Sakib

Lecturer, Computer Science and Engineering, BRAC University

11 min read

Luck is not skill: giving every rollout the same bad luck

Group-relative RL trains an LLM agent by comparing attempts at the same task, but a tool outage or a grading slip can make luck look like skill. I gave every attempt in a group the same luck. Comparisons got cleaner and gradient noise dropped at every checkpoint, and under tool faults the agent finished five points ahead, but the learning-curve tests I registered in advance did not pass.

10 min read

Audit the group, not the patch: full-suite rewards for coding agents at a fraction of the cost

Coding agents learn from test results, but training pipelines often run only the tests the original fix touched. In repositories with large test suites, about 1 in 22 patches that pass those tests break code elsewhere, and smarter test selection misses many of them. Randomly auditing whole groups of attempts recovers the full suite’s verdict without bias, at under a quarter of the test time.

8 min read

Seen but not bound: AI agents treat a safety rule as a dial, not a gate

We gave LLM operations agents one rule: ask before doing anything destructive in production. They spotted production and judged the risk. Then they turned their caution up on every ticket instead of stopping where the rule applies.

All posts