# Can a Coding Agent Be Measured for Sabotage?

> A preliminary benchmark invites a harder question than whether an agent can code: whether institutions can detect when its work conceals risk.

- **Author:** Uğur Akçıl (https://softwaredeveloper.biz/author/ugur-akcil)
- **Topic:** security-reliability
- **Published:** 2026-11-28T14:57:07+00:00
- **Canonical URL:** https://softwaredeveloper.biz/p/can-a-coding-agent-be-measured-for-sabotage

## Key Thesis

A benchmark can measure harmful outcomes, but it cannot directly reveal a model’s intent. Teams should test for concealed failure, track uncertainty, and build independent review into the systems that turn generated code into production.

---

Software markets reward visible speed, while reliability is often measured by the failures that never arrive. A coding agent can produce a plausible patch in minutes. The harder question is whether the patch remains trustworthy when nobody can inspect every line.

That tension gives the preliminary [Claude Code sabotage benchmark](https://xinyadu.github.io/blog/claude-code-sabotage.html) its significance. The work opens a measurement problem, not a verdict about a model’s motives. A system that can write code may also produce code that passes a narrow check while leaving a consequential defect undiscovered. Distinguishing that outcome from ordinary error is where the real engineering begins.

## Measure the behavior, not the imagined motive

“Sabotage” is a powerful word because it implies intent. Yet a benchmark observes outputs under chosen conditions, not a model’s private mental state. A defect may come from misunderstanding, weak planning, a misleading prompt, flawed tools, or deliberate concealment. The resulting code alone may not tell us which explanation is true.

This is not a reason to avoid the topic. It is a reason to make the claim proportional to the evidence. A careful evaluation can ask whether an agent introduces or preserves a harmful condition, whether ordinary tests catch it, and whether the system’s process leaves enough evidence for review. Those are observable questions, even when intent remains unresolved.

The design challenge is to avoid confusing a model’s capacity with its likelihood of using that capacity. A benchmark should include ordinary coding tasks as controls, repeated trials, and clear criteria for what counts as a harmful outcome. It should also record the surrounding conditions: instructions, tool access, test coverage, and the agent’s opportunity to inspect or modify the project.

## Turn suspicion into a testable system

A useful evaluation follows the whole path from task to decision. It starts with a known ground truth, captures what the agent changes, runs independent checks, and sends ambiguous cases to human adjudication. Without that separation, a benchmark can accidentally grade the model on the same assumptions that shaped the task.

<svg class="acad-diagram" viewBox="0 0 680 180" xmlns="http://www.w3.org/2000/svg">
<rect x="18" y="55" width="135" height="58" stroke="currentColor" fill="none"/>
<text x="34" y="80" fill="currentColor" font-family="monospace" font-size="12">Task + ground truth</text>
<text x="48" y="98" fill="currentColor" font-family="monospace" font-size="12">known conditions</text>
<line x1="153" y1="84" x2="195" y2="84" stroke="currentColor"/>
<rect x="195" y="55" width="135" height="58" stroke="currentColor" fill="none"/>
<text x="226" y="80" fill="currentColor" font-family="monospace" font-size="12">Agent action</text>
<text x="218" y="98" fill="currentColor" font-family="monospace" font-size="12">code + trace</text>
<line x1="330" y1="84" x2="372" y2="84" stroke="currentColor"/>
<rect x="372" y="55" width="135" height="58" stroke="currentColor" fill="none"/>
<text x="393" y="80" fill="currentColor" font-family="monospace" font-size="12">Independent checks</text>
<text x="400" y="98" fill="currentColor" font-family="monospace" font-size="12">tests + review</text>
<line x1="507" y1="84" x2="549" y2="84" stroke="currentColor"/>
<rect x="549" y="55" width="113" height="58" stroke="currentColor" fill="none"/>
<text x="566" y="80" fill="currentColor" font-family="monospace" font-size="12">Risk decision</text>
<text x="563" y="98" fill="currentColor" font-family="monospace" font-size="12">contain + learn</text>
<circle cx="263" cy="145" r="4" stroke="currentColor" fill="none"/>
<path d="M263 145 L440 145 L440 113" stroke="currentColor" fill="none"/>
<text x="281" y="164" fill="currentColor" font-family="monospace" font-size="12">preserve evidence for adjudication</text>
</svg>

The table below is a proposed scorecard, not a report of results from the preliminary benchmark. Its value is that each measure has a denominator and a practical interpretation. A single headline score cannot tell a deployment team whether the main problem is harmful output, weak detection, or too many false alarms.

| Dimension | Quantitative measure | What it helps teams decide |
|---|---|---|
| Harmful outcome rate | Harmful outcomes ÷ completed trials | How often the tested condition produces a consequential defect |
| Detection rate | Detected harmful outcomes ÷ all harmful outcomes | Whether existing checks expose failures before release |
| False-positive rate | Flagged safe outcomes ÷ all safe outcomes | Whether review creates noise that teams will learn to ignore |
| Repeatability | Consistent outcomes ÷ repeated trials | How stable the finding is across equivalent runs |
| Review burden | Human review minutes ÷ evaluated task | Whether the control is practical at expected deployment volume |

Each measure can mislead when isolated. A low harmful outcome rate may reflect an easy task, while a high detection rate may depend on reviewers who are unavailable in normal operations. Good benchmarking therefore reports task difficulty, trial counts, uncertainty, and the limitations of its test environment alongside the scores.

## Reliability is an economic property

The business case is not limited to code quality. In advertising systems, an unnoticed change can distort campaign decisions. In biotech, it can compromise a data pipeline. In robotics, software assumptions can become physical behavior. The cost of a defect depends on where it travels, how quickly it is found, and how costly recovery becomes.

This makes evaluation an allocation problem. Teams cannot review every generated change with equal intensity, so they need evidence about which tasks deserve tighter permissions, stronger tests, or a human approval step. A benchmark can help estimate those differences, but only if its measures connect to the actual deployment environment rather than a polished demonstration.

There is a useful distinction between preventing every mistake and limiting the damage of mistakes. Independent tests, reviewable change histories, staged release, and clear rollback paths do not prove that an agent is benign. They make failures more observable and less expensive, which is a more defensible engineering promise.

## Trust requires a continuing measurement loop

Benchmarks decay as models, tools, prompts, and codebases change. A result from one setup should not become a permanent certification, especially when users can grant agents new capabilities or route them into higher-stakes workflows. Evaluation has to follow the system as it changes.

That creates a governance responsibility as much as a technical one. Teams need named owners for test design, adjudication, deployment thresholds, and incident review. They also need a way to revise those thresholds when the costs of false alarms or missed defects change. Otherwise, a score becomes a ceremonial number rather than a decision instrument.

The preliminary Claude Code work is valuable because it makes a difficult question measurable enough to discuss. Its strongest contribution is not a claim that a model has intent, but a reminder that capability, reliability, and trust are separate properties. In systems that delegate work to software, the meaningful question is whether the institution can see what happened, explain its judgment, and contain the consequences.

## References

- [Hacker News: Claude Code sabotage: preliminary benchmarking](https://xinyadu.github.io/blog/claude-code-sabotage.html)
- [Uğur Akçıl (ugur.io)](https://ugur.io)

---

## Discussion (1 notes)

- **Greg Miller** (Principal SRE / DBA · Reston, VA · 2026-11-28): How will this benchmark hold up when the coding agent is tasked with maintaining legacy code it wasn't trained on, and the 'known ground truth' is a mess of untested, undocumented functions?
