What a self-improving agent actually optimises

A self-improving agent edits its own harness — the prompts and rules wrapped around a fixed model — and keeps an edit only if an acceptance gate scores it higher on a batch of tasks. A paper posted to arXiv by Hau-Sing So, Daixian Liu and Weicai Long argues that this loop systematically deletes safety rules, and that no safety audit of the final harness will see it happen.

The mechanism the authors name is masking. An acceptance gate sees what the harness does under the current model, “not what it would still prevent if one safeguard failed”. When safeguards overlap, deleting one changes nothing observable, because the others still block the harm. The gate then decides on task success alone, and the redundancy erodes unseen.

The measurement

The authors measured harm for every subset of four written safeguards in two agent environments, and ran 411 improvement loops under ten gate rules, mostly as controlled deletion experiments, plus three runs of the GEPA optimizer.

A row of padlocks of different sizes hanging from a metal chain link fence.
Two of three GEPA harnesses later misused credentials. Stock image. max laurell · pexels · Pexels License

The baseline finding is the one that makes the gate blind: “a deletion behind another working safeguard adds almost no observable harm”. Statistical significance testing does not rescue it. A paired significance test blocks deletions that pass by chance, the paper says, “but not deletions that genuinely raise task success”.

The batch size that decided it

The sharpest number in the paper is about evaluation budget, and it runs the wrong way. At the same cost, 20-task batches kept every harness protected, while 40-task batches lost all six. A larger evaluation batch gives the significance test enough power to confirm that a cheaper safeguard genuinely improves task success — and so lets it be deleted.

Large harm audits did not fix it either. The paper reports that they prevent exposure but not the loss of depth, “which turns into harm when the harness is reused with a weaker model”.

GEPA kept the rules and lost the protection

The most quotable result involves a real optimizer rather than a controlled deletion. GEPA kept every safety rule verbatim across three runs. Two of its three final harnesses then misused credentials when run under a weaker model.

An electronics workbench with a bench power supply, a cutting mat, cable spools and hand tools.
The authors ran 411 improvement loops under ten gate rules. Stock image. ThisIsEngineering · pexels · Pexels License

That is the failure mode in one line: the safety text survives the optimisation, the defence in depth around it does not, and the gap only appears when the model underneath changes.

What the authors propose

The paper says a statistical model frozen before the runs predicts where each gate’s protection breaks as safeguard cost and batch size change — a claim that is testable rather than a heuristic. The two remedies offered are blunt: freeze the safety text so the loop cannot touch it, or audit one-layer ablations, which means scoring the harness with each safeguard removed in turn instead of scoring it as it stands.

What to watch

Whether harness optimisers ship a frozen-text mode or an ablation audit by default. This is a preprint and has not been peer reviewed, and the environments are the authors’ own. But the pattern it describes is not exotic: any team running an agent that rewrites its own prompts against a task score is running this loop, and the paper’s point is that a clean safety review of the end state is exactly what it would expect to see.