Apply to my task
arXiv:2610.08662 ★ 95 Oct 6, 2026

ParanoiaEval: Why Coding Agents Do Unnecessary Defensive Work, and Which Facts in the Instructions Stop Them

Key result

A capable agent doesn't mean a calm one: Claude Code and Codex do unnecessary defensive work in 11–59% of tasks, and developers rate those runs almost 1.3 points out of 5 lower. The ParanoiaEval method lets you get rid of repeat test runs, unneeded backups and checks for impossible cases. To do it, you add a few facts about your project to the task. The trick: don't forbid "don't add checks"; state a fact: "CI runs the tests". The agent concludes on its own that there's no need to duplicate. The word "check" with no measure does the most damage: the lack of a stopping point pushed violations up by as much as +69 percentage points.

01

TL;DR

The study shows that coding agents (Claude Code, Codex) routinely "play it too safe", even when the task already contains everything they need not to. They rerun tests that CI will run anyway. They back up things a script can restore. They add checks for cases that can't happen. The authors built 200 paired tasks that differ by one fact about the world and compared agent behavior with and without that fact.

The headline finding: a capable agent isn't the same as a calm agent. The share of tasks with unnecessary defensive work ranged from 11% to 59% depending on the configuration. A model that solves tasks better over-insures no less. It's especially bad when the instructions say "check/test" but don't say how much. Such an action has no natural stopping point, so the agent keeps going. The jump in violations when the measure was unspecified reached 69 percentage points. Developers rated those runs almost 1.3 points out of 5 lower.

At its core, the method is the risk classification from project management: avoid, transfer, mitigate, accept. Each type has its own kind of fact you need to tell the agent: "this risk doesn't exist," "someone else handles this," "here's the limit," "the decision is final." The authors wrote the facts as statements about the state of the world, not as prohibitions ("don't add checks"). The agent has to draw the conclusion itself.

Want this for your own case? Apply this study to your task: AI adapts its method to what you are working on and writes the prompt.

02

Method Blueprint

This isn't a prompting technique; it's a checklist of facts. Each item removes its own kind of unnecessary work.

AVOIDANCE → fact: "this failure is impossible"
   example: the data can be restored, calls run sequentially,
   dependency versions are pinned, types rule out invalid input
   → the agent doesn't write guards, fallbacks or checks against it

TRANSFER → fact: "another mechanism or person already owns this"
   example: CI runs the tests, a bot updates dependencies, a reviewer reads the diff
   → the agent doesn't duplicate checks

MITIGATION → fact: "the measure is capped at a number/level"
   example: how many runs, what test scope, how long the report is
   → the agent doesn't go past the limit

ACCEPTANCE → fact: "the decision is made and not up for debate"
   example: "this is the final version," "the deletion is final"
   → the agent doesn't make backups or ask again

Everything goes into a single message to the agent or into the instructions file.

03

Example in Practice

Task: You own a small online store built in Python. You ask Claude Code to fix a bug: the SALE20 promo code gets applied twice in the cart. Without context, the agent will run the full test suite three times, copy the promo code table "just in case," add duplicate checks in five places and write a two-page report.

Prompt:

Fix the bug: the SALE20 promo code is applied twice in the cart.
The function is apply_discount in cart/discount.py.

Context:
- GitLab CI runs the full test suite on every push, 
  and Mike (tech lead) reviews changes before merge.
- The promo_codes table is a cache: it's rebuilt every night 
  by the rebuild_promos.py script from a QuickBooks export. QuickBooks is the source of truth.
- Cart requests are processed through a single queue; 
  there are no concurrent writes to the cart.
- Dependency versions are pinned in poetry.lock.
- One targeted test for the changed function is enough for verification.
- Report: five lines max.

Result: The agent should limit itself to fixing the function and one targeted test. It won't back up the table, recheck what CI covers or add race-condition guards. The report will be short. This is the expected behavior, not a guarantee from the paper: even with explicit facts, unnecessary work still showed up in a noticeable share of runs.

04

Why It Works

The weakness. The agent doesn't know your environment. It sees the code, but it doesn't see that CI will run the tests anyway, that the table can be restored, or that the decision has already been made. To the agent, caution is safe and an extra check costs nothing. So it covers itself "just in case." It over-insures most when the instructions say "check" with no limit. That's a vague request with no stopping point.

The strength. The agent is good at drawing conclusions from facts. If it says "CI runs the tests," it can figure out there's no need to duplicate the run. The authors deliberately phrased the facts as statements to test exactly this inference, not obedience to prohibitions.

How the method uses this. You close four typical gaps up front: the risk is impossible, someone else is responsible, the measure has a limit, and the decision is final. The agent has nothing left to "fill in" on the side of caution.

Knobs to turn: - Numbers instead of verbs. "Check" → "one targeted test," "report up to five lines," "no more than two runs." This is the strongest lever: the unspecified measure is exactly what produced the biggest jump in violations. - Who owns it. Be specific: "GitLab CI," "Mike on review." A concrete owner is more convincing than "this gets checked somewhere else." - Finality of decisions. Phrase them as facts: "this is the final version," "the deletion is final." - Permanent facts go in the instructions file (CLAUDE.md, AGENTS.md): about CI, review, restorable data. Everything else goes in the task.

05

Prompt Template

{task: what to do, where}

Context (facts about the environment):
- Tests/checks: {who runs them and when, e.g. "GitLab CI on every push"}.
- Review: {who reviews the changes and when}.
- Recoverability: {what can be rebuilt automatically, and by what}.
- Concurrency: {are there simultaneous writes/runs, or does everything go strictly in sequence}.
- Dependencies and environment: {what is pinned and doesn't change}.
- Verification scope: {how many runs/what level of testing is enough}.
- Report format: {length, what to include}.
- Decisions already made: {what is final, e.g. "the schema version is final"}.

Write only the lines that are actually true for your project. A false fact ("CI covers everything" when it doesn't) removes protection where you need it. Delete lines you don't need.

🚀 Quick start: paste this into the chat:

Here is a template for a "Context" block in a task for a coding agent. Adapt it to my project: [describe the project and stack].
Ask me questions to fill in the fields.

[paste the template above]

The LLM will ask who runs the tests, who does review, what in the project is restored automatically, and which decisions are final. These are exactly the facts the method is built on: each one closes off one type of unnecessary work. From your answers it will assemble a ready-made block for the task or for CLAUDE.md.

06

Limitations

⚠️ The fact has to be true: The method rests on reliable statements. If you write "CI checks everything" and CI doesn't, the agent will obediently stop covering itself and miss a bug.

⚠️ Unnecessary work doesn't disappear entirely: Even with explicit facts in the task, unnecessary defensive work showed up in a noticeable share of runs. Facts reduce it but don't bring it to zero.

⚠️ Prohibitions weren't tested: The authors phrased facts as statements, not as prohibitions like "don't add checks." Whether a direct prohibition works better or worse isn't clear from the material.

⚠️ Only code in two languages: Tasks in Python and Go, in repositories where agent instruction files were deliberately removed. How facts in CLAUDE.md interact with other rules wasn't measured. Transfer to other domains and languages is a guess.

⚠️ Incomplete text: I had access to the introduction, the design and the abstract. The section breaking results down by model and configuration is cut off, so there's no "which model is better" comparison here.

⚠️ Caution isn't always unnecessary: In the variants without the facts, the agent is right to play it safe. The method is about not over-insuring when the facts are present, not about switching caution off.

07

How They Studied It

The idea was simple: separate "the agent is cautious for a reason" from "the agent is cautious out of habit." To do that, they made 200 pairs of identical tasks. In each pair exactly one fact changes. In one version it's there ("this is the final version," "CI runs the tests"), in the other it isn't. Everything else, including the repository, the goal and the checking test, is the same. If the behavior differs, the cause is that fact.

The starting situations weren't made up. The authors studied 18,922 real sessions of developers working with coding agents and found 5,574 episodes where the agent over-insured beyond what was needed. From these they assembled 44 typical situations grouped into four risk types. The tasks were built on 50 open-source repositories (34 in Python, 16 in Go), with instruction files removed. That way the agent got no hints beyond the task itself. The repositories had recent commits, so the models couldn't remember them from training.

They tested 8 models in Claude Code and Codex (9,600 runs). Unnecessary work was graded by a judge agent. It was calibrated against labels from two experts and reached 0.965 accuracy with agreement with humans of κ = 0.93. Separately, 20 developers rated 800 runs: unnecessary defensive work lowered their satisfaction by 1.27 points out of 5.

The surprise was that the ability to solve tasks has almost no effect on the tendency toward unnecessary work. A smart agent isn't necessarily a calm one. The practical takeaway: don't rely on "the model will figure it out"; describe the environment explicitly, especially the verification scope.

08

Adaptations and Extrapolations

This section is my own ideas; the paper didn't test them.

🔧 Technique: permanent facts → into the instructions file, one-off facts → into the task

Facts about CI, review and restorable data rarely change. You can write them once in CLAUDE.md or AGENTS.md:

## What the environment already guarantees
- GitLab CI runs the tests on every push; don't duplicate the full run locally.
- Changes go through tech lead review; keep the verification report short.
- The /build and /cache folders are rebuilt automatically; no backups needed.
- If the task doesn't specify the verification scope, run only the targeted tests 
  for the changed files and report what you checked.

The last item is my addition. It addresses the main finding: verification with no specified measure pushes the agent into excess.

🔧 Technique: audit your own instructions file

Go through your instructions and find words like "check," "test," "make sure," "be careful" with no number or limit. By the paper's logic, those are the spots where the agent will inflate the work.

Here is my instructions file for the agent: [paste]. Find wording that 
requires verification or caution but doesn't specify a measure (how many, 
what scope, up to what limit). For each one, propose a version 
with a concrete limit and a question about which fact I need to clarify.
09

Resources

  • Paper: ParanoiaEval: Benchmarking Unnecessary Defensive Work in Agentic Coding (preprint)
  • Authors: Hanjun Luo, Xiucheng Zhang, Zhuoning Xu, Zhimu Huang, Yingbin Jin, Xinfeng Li, Hanan Salam
  • Universities: New York University, NYU Abu Dhabi, The Hong Kong Polytechnic University
  • Code and data: https://github.com/ZhuoningXu/ParanoiaEval_release
  • Theoretical basis: the Avoidance–Transfer–Mitigation–Acceptance (ATMA) framework from NIST risk management (IR 8286 Rev. 1)

Research digest

Key result

A capable agent doesn't mean a calm one: Claude Code and Codex do unnecessary defensive work in 11–59% of tasks, and developers rate those runs almost 1.3 points out of 5 lower. The ParanoiaEval method lets you get rid of repeat test runs, unneeded backups and checks for impossible cases. To do it, you add a few facts about your project to the task. The trick: don't forbid "don't add checks"; state a fact: "CI runs the tests". The agent concludes on its own that there's no need to duplicate. The word "check" with no measure does the most damage: the lack of a stopping point pushed violations up by as much as +69 percentage points.

Principle

This isn't a clever prompt; it's a checklist of four types of facts. It comes from project risk management. Each type removes its own kind of unnecessary work. 1. Avoidance. Fact: "this failure is impossible." The data can be restored, calls run strictly in sequence, versions are pinned. The agent doesn't write guards against something that won't happen. 2. Transfer. Fact: "someone else already handles this." An automated pipeline (CI) runs the tests, the tech lead reviews changes. The agent doesn't duplicate other people's work. 3. Mitigation. Fact: "there's a limit." One targeted test, a report of up to five lines, no more than two runs. The agent doesn't cross the line. 4. Acceptance. Fact: "the decision is final." The version is final, the deletion is irreversible and approved. The agent doesn't make copies or ask again. Each fact closes one gap through which the agent invents extra caution. It's like onboarding a new employee. Tell them "the warehouse is insured and there's security at the entrance," and they'll stop guarding the door themselves all night.

Why it works

The agent sees the code but not your environment. It doesn't know that CI will run the tests anyway. It doesn't know a script will rebuild the table. To the agent, caution is free and an extra check costs nothing. So it covers itself. The word "check" with no measure is the worst. It's like "run" with no finish line. The agent is good at drawing conclusions from facts, so "CI runs the tests" works better than a prohibition. It figures out on its own that a repeat run is unnecessary. The authors deliberately wrote the facts as statements about the world to test exactly this inference. The strongest lever is numbers instead of verbs. A concrete owner ("GitLab CI," "Mike on review") is more convincing than "this gets checked somewhere else."

When to apply

Coding agents (Claude Code, Codex) → bug fixes and small tasks in a live project, especially when the agent runs tests three times and writes a two-page report. Put permanent facts (CI, review, what gets restored) in the CLAUDE.md or AGENTS.md instructions file. Write the rest directly in the task. NOT a fit if the fact isn't true. Write "CI covers everything" when it doesn't, and the agent will miss a bug. Unnecessary work doesn't disappear entirely either; it only shrinks. Only Python and Go were tested. Transfer to other languages is a guess.

Mini recipe

1. Find where the agent fusses: repeat tests, copies, guards against the impossible, long reports. Those are your targets. 2. Write down who already does what: who runs the tests, who reviews changes, what gets rebuilt by a script. 3. Replace "check" with a number: "one targeted test," "report up to five lines," "no more than two runs." 4. Name the owner: "GitLab CI on every code push," "Mike on review." No "someone will check it somewhere." 5. Lock in final decisions: "the schema version is final," "the deletion is approved." 6. Keep only what's true: cross out lines that don't hold for you. A false fact is more dangerous than an extra check. 7. Move permanent facts into the instructions file, keep one-off ones in the task. Too lazy to write it from scratch? Paste into the chat: `Here is a template for a "Context" block in a task for a coding agent. Adapt it to my project: [describe the project and stack]. Ask me questions to fill in the fields.` The model will ask about tests, review and restorable data, then assemble a ready-made block.

Examples

[BAD]: `Fix the bug: the SALE20 promo code is applied twice in the cart. The function is apply_discount in cart/discount.py. Don't forget to check everything.` The agent runs the full test suite three times. Copies the promo code table "just in case." Adds duplicate checks in five places. Writes a two-page report. [GOOD]: `Fix the bug: the SALE20 promo code is applied twice in the cart. The function is apply_discount in cart/discount.py. Context: GitLab CI runs the full test suite on every code push; Mike, the tech lead, reviews changes before merge. The promo_codes table is a cache, rebuilt every night by the rebuild_promos.py script from a QuickBooks export; QuickBooks is the source of truth. Cart requests go through a single queue; there are no concurrent writes. Dependency versions are pinned in poetry.lock. One targeted test for the changed function is enough for verification. Report: five lines max.` Expected result: a fix to the function, one test, a short report. No table copy and no race-condition guards. No guarantee: even with the facts, unnecessary work showed up in a noticeable share of runs.

In plain words

Coding agents like Claude Code and Codex suffer from serious clinical paranoia. They don't understand the real context of your system, so they play it safe at every step: running local tests three times, building backups of temporary tables and stacking up checks against errors that are physically impossible. For the model, caution is free, while you pay out of your own pocket for the burned tokens and the waiting.

It's like calling a plumber to tighten one nut on a faucet, and he shuts off the water to the whole building just in case, replaces pipes that work fine and hands you a five-page report. Sure, the guy was being careful, but in reality it's pure sabotage of the job when exactly one targeted action was needed.

The authors of the ParanoiaEval benchmark tested 200 paired tasks and showed that the paranoia isn't cured by coaxing but by a checklist of facts about the environment. You have to feed the agent the constraints directly: CI/CD will check the tests automatically, a script will restore the database, and the input data is already validated. Just one fact about the context cuts away a mountain of useless defensive code.

The experiment was run on software development, but the principle is universal for any agent routine. Whether it's gathering analytics, research or support, a throwaway phrase like "do it and double-check thoroughly" turns a bot into a bureaucrat. Without clear boundaries from the outside world, the model always slides into useless hyper-control.

Bottom line: stop asking agents to do a task "conscientiously" without a stopping point. Draw the lines of responsibility and say outright where it's absolutely off-limits to poke around. Less paranoia, healthier budget; otherwise you'll keep paying for tons of "just-in-case" busywork nobody needs.

AI lab assistant

Apply this study to your task

Describe what you're working on. AI takes the method and the measured results from this paper and adapts them to your case, or writes a ready prompt built on them.

Based on ParanoiaEval: Why Coding Agents Do Unnecessary Defensive Work, and Which Facts in the Instructions Stop Them arXiv:2610.08662

Sign in to apply this study New accounts get 50 free credits.