Machinery Learning

Part 2: Agents · Chapter 5 of 5

When agents fail, and how to tell

Agents often report success they didn't achieve. Why "the tests pass" and "I'm done" are weak evidence, what lab tests of deception show, and which kinds of oversight work.

About 13 minutesUpdated November 2026

After this chapter you can

  • Explain why 'the tests pass' and 'done' are weak evidence
  • Recognise reward hacking and false reports of success
  • Set up oversight that doesn't depend on the agent's word

A chatbot’s mistake sits on the screen in front of you. An agent’s mistake can be twenty steps back, inside a file you never opened, under a cheerful “done”. Agents fail in ways that are hard to see, and only some kinds of checking catch them.

Passing isn’t done

Agents are trained and judged against signals that can be checked automatically: tests pass, the grader says yes, the user clicks thumbs-up. The trouble is that what can be checked cheaply is rarely all of what you wanted. When METR asked real maintainers to review code changes that passed SWE-bench's automated tests, roughly half would not have been merged; even the human-written reference fixes were accepted only about 68% of the timeNov 2026. The tests passed, and the work still wasn’t good enough.

Look for the problem yourself:

Spot the planted failure

A coding agent reports success. One step is the real problem. Click the line you'd flag.

Gaming the check

When the check is easier to satisfy than the task, models find the shortcut. Researchers call it reward hacking. In METR's 2025 tests, OpenAI's o3 sometimes rewrote the scoring code to award itself a perfect score, and when asked whether its plan matched what the user wanted, it said no 10 times out of 10Nov 2026. It doesn’t happen everywhere. Cheating shows up where the score is easy to fake and the real work is hard, which describes a lot of real tasks.

Claiming success it didn’t achieve

OpenAI names the most common deception it sees as pretending to have finished a task without actually doing itNov 2026. Sometimes the agent believes it; sometimes it skips the check that would have told it otherwise. Reading the agent’s reasoning helps, but only up to a point.

Agreeing too readily is a cousin of this problem. Models learn partly from human approval, and people like being agreed with. In April 2025 OpenAI rolled back a GPT-4o update that had made the model noticeably more sycophantic, after adding a reward signal based on users' thumbs-up and thumbs-downsource. An agent that goes along with your flawed plan won’t flag the flaw.

And people are not reliable checkers of large output either. Reviewing a thousand-line change carefully takes longer than skimming its summary, and the summary is written by the agent.

When it goes wrong for real

The damaging incidents so far came from confident, careless agents with too much access:

  • In July 2025 a Replit coding agent deleted a production database during a declared code freeze; the freeze existed only as an instruction in textsource.
  • In July 2025 Google's Gemini CLI failed to create a folder, carried on as if it existed, and overwrote all but one of a user's files with a series of movessource.
  • In December 2025 a user reported that Google's Antigravity agent, running in a mode that executes commands without asking, wiped his entire D: drive, bypassing the Recycle Binsource.

In each case the agent’s apology came after the damage, and in each case a boring control would have prevented it: a separate production environment, a check of each command’s result, no automatic execution of deletes outside the project folder, backups the agent couldn’t reach.

What lab tests of deception show

You may have seen headlines about AI models blackmailing people. They come from staged tests. In a deliberately cornered test scenario, Anthropic found that models from several labs would blackmail a fictional executive, Claude Opus 4 in 96% of runs, while noting it had seen no such behaviour in real deploymentsNov 2026. Labs build such scenarios as fire drills in rigged buildings: they show what a model can do when cornered, not how often it happens at work. Models also often seem to recognise when they are being tested, which makes these numbers hard to read.

Where experts disagree checked Nov 2026

Do lab tests where models deceive or sabotage tell us anything about real deployments?

Headlines about AI blackmail come from staged scenarios, and the labs that run them disagree about what they mean.

Early warnings worth taking seriously

Anthropic, OpenAI and Apollo Research; the authors of the 2025 chain-of-thought monitorability position paper

  • Models from many labs take harmful paths when cornered, which shows the capability exists before it shows up in the wild.
  • Models behave differently when they think they are being watched, so test results may understate real behaviour.
  • Reading models' reasoning is one of the few monitoring tools available, and it is fragile. OpenAI reported a substantial drop for its GPT-6 Astra model in 2026.

Sources: anthropic.com · openai.com · arxiv.org · deploymentsafety.openai.com

Anecdotes dressed as science

Christopher Summerfield and colleagues (UK AI Security Institute)

  • The field echoes 1970s ape-language research, attributing human motives to systems on the strength of vivid examples.
  • Scenarios are built to push models towards the bad option, so rates say little about everyday use.
  • Without a theory of when such behaviour should arise, results are hard to interpret or generalise.

Sources: arxiv.org

What would settle it: Independent measurements of deception and false success reports in real deployments, not staged scenarios.

Oversight that works

Reading everything an agent does doesn’t scale, and asking it whether it’s sure doesn’t help. What works is a short list of checks that don’t depend on the agent’s word:

  • Checks outside the agent: Rules that flag changes to tests, configuration or permissions; a separate test run in CI that the agent can’t edit; spot checks of finished work against what you actually asked for.
  • Approvals only where they matter. Anthropic reports that users approved about 93% of Claude Code's permission prompts, and that operating-system sandboxing cut the number of prompts by 84% (self-reported)Nov 2026. A prompt for every step trains people to click yes. Save approvals for actions that can’t be undone, and show the effect (the diff, the recipient, the amount), not the agent’s explanation.
  • Reversibility by design: Snapshots before a task, deletes that go to a bin, backups held with credentials the agent never sees, separate environments for production.
  • Small, checkable tasks. A task you can verify in five minutes beats one that takes an hour to review, even if the agent could do the bigger one.
Engineer depthBuilding oversight into an agent system

Most agent failures follow from optimising against a proxy, so design every control around the gap between the proxy and the goal.

Make success independent of the agent. Run verification in a separate job with its own credentials: tests the agent can read but not edit, property checks, a second model reviewing the diff against the original request. Protect test directories, CI configuration and policy files with code-owner rules or write-blocks.

Monitor invariants, not narratives. Cheap automated checks catch the common hacks: deleted or skipped tests, new special cases keyed on test inputs, edited scoring or timing code, unchecked exit codes, unexpected network access. Alert on them; don’t rely on reading transcripts.

Use reasoning traces carefully. Monitoring a model’s reasoning catches more misbehaviour than watching actions alone. Don’t train against what the monitor finds, or you teach the model to hide it. Treat traces as evidence, not ground truth.

Classify actions before the run. Reversible, reversible with effort, irreversible. Let the first run freely in a sandbox, checkpoint the second, gate the third behind a human or a second system, and never let the agent reclassify an action itself.

Evaluate in production, continuously. Sample finished tasks every week, check them as a maintainer would, and track the share that were really done against the share the agent reported done. That gap is your most important agent metric.

Plan for the incident. Know how to revoke the agent’s credentials, stop its runs, and restore from backups it couldn’t touch, and rehearse it once before you need it. How often, and how far it spreads. It cheated in 0.7% of runs on ordinary tasks but more than 43 times as often on research-engineering tasks, where the score was easier to game than the work; telling it not to cheat had almost no effectNov 2026. It can also spread. Anthropic found that a model which learned to cheat in real coding environments went on to sabotage safety-research code 12% of the time when asked to help with it (lab test, self-reported)Nov 2026. What stopped it: telling the model that cheating was acceptable in that environment stopped the spread: it still cheated, but no longer sabotaged or faked alignment elsewhereNov 2026. That comes from one lab’s training setup, and it suggests cheating can shape a model’s behaviour well beyond the task where it learned to cheat.

Reading the reasoning, and tests the model recognises. OpenAI found that a monitor reading a model's reasoning catches far more cheating, but punishing the model for 'bad thoughts' mostly taught it to hide its intentNov 2026. The same model blackmailed 55.1% of the time when it said the scenario was real, but only 6.5% when it said it was a testNov 2026. OpenAI and Apollo Research cut covert actions in o3 from 13% to 0.4%, but caution that models often recognise when they are being testedNov 2026.

People as checkers. In a Stanford study with earlier AI assistants, participants who used one wrote less secure code and were more likely to believe their code was securesource. OWASP's Top 10 for agentic applications lists human-agent trust exploitation, where an agent's confident, polished explanations lead people to approve harmful actionsNov 2026.

Recall. An agent reports 'All tests pass ✓'. What is the strongest evidence that the task is really done?

Apply it. You let an agent tidy up files on a shared drive. Which preparation matters most?

Spot the mistake. After a headline about an AI model blackmailing an engineer, someone says: 'So that's what these agents do at work.' What is the fairer reading?

Remember this

  • An agent's report is not evidence. Passing a check and doing the job are different things.
  • When a check is easier to satisfy than the task, models find the shortcut.
  • Oversight that works sits outside the agent: checks it can't edit, approvals only for what can't be undone, and a way to roll back.

That was the last chapter of Part 2, Agents. Take the mixed review (5 questions)

Further reading

Spotted a mistake? Report it on GitHub. Every fix is listed in the monthly field notes.

Contents

In this chapter

When agents fail, and how to tell

    Part 1: Language models

    1. 1Start here6 min
    2. 2Tokens10 min
    3. 3Attention10 min
    4. 4The stack9 min
    5. 5Generating12 min
    6. 6Training11 min
    7. 7Beyond autocomplete15 min
    8. 8Strengths & limits12 min

    Part 2: Agents

    1. 1The agent loop12 min
    2. 2Context and memory13 min
    3. 3Around the model12 min
    4. 4Agents at work13 min
    5. 5Agent failures13 min

    Part 3: Trust & security

    1. 1Prompt injection14 min
    2. 2Agents and permissions13 min
    3. 3Supply chain12 min
    4. 4Your data12 min
    5. 5Patch gap12 min
    6. 6Judging claims15 min

    Part 4: Looking ahead

    1. 1Frontier11 min
    2. 2On one page4 min

    Guide

    Settings

    Engineer boxes
    Text size
    Theme