Apply to my task
arXiv:2610.18090 ★ 92 Oct 13, 2026

AM-Bench: Which Gaps in an Agent's Task Do the Most Damage

Key result

The agent says “done,” the output looks right, and a prohibition has been violated. If a constraint went unnamed, not one of the 20 “model + agent harness” combos completed the task correctly even once. The AM-Bench diagnostic lets you see in advance which gap in a spec costs the most: goal, context or constraints. The three gaps break an agent in different ways. No goal: the work is left unfinished. No context: the agent burns tokens. No constraints: rule compliance drops by 73 percentage points, while task completion itself barely suffers.

01

TL;DR

AM-Bench is a test suite that showed three kinds of gaps in a task spec break an agent in different ways. Missing goal: the agent leaves the job half-done. Missing context (where to get the data, which sources count as primary): the agent burns way more tokens. Missing constraints (what not to touch, where not to go poking around): the agent finishes the task but breaks the rules.

The nastiest finding is about constraints. The agent says “done,” the output looks right, and a prohibition has been violated. Task completion barely suffers, while rule compliance collapses (a 73-percentage-point drop). When a constraint wasn't mentioned at all, not one of the 20 “model + agent harness” combos completed the task correctly even once. Meanwhile, the share of “completed” tasks actually went up for some combos. The reason: the agent doesn't know about a rule nobody told it, and doesn't realize it should ask. One more takeaway: missing information entirely is worse than vague information, in all three areas.

The practical lesson is simple. Before you launch an agent, check the task against three fields: goal, context, constraints. Write constraints explicitly and separately. In the agent's instructions, require it to stop and ask whenever an action depends on an unclear requirement. By the authors' estimate, clarifying questions mostly recover unfinished work, but do almost nothing for violated constraints.

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

The paper doesn't propose a prompting technique. It's a diagnostic, and it converts neatly into a checklist:

FIELD 1: GOAL        → exactly what result you need (format, done criterion)
                       Gap → agent leaves it unfinished
FIELD 2: CONTEXT     → where to get the data, which source is primary
                       Gap → agent goes hunting on its own, burns tokens
FIELD 3: CONSTRAINTS → what must not be touched / read / changed
                       Gap → agent finishes and breaks the rules
RULE: if an action depends on an unclear field → stop and ask

All of this fits in a single message or in the agent's instructions file.

03

Example in Practice

Task: You run a small store selling on Amazon and Etsy. You ask Claude Code to build a script that pulls the week's sales and calculates margin per SKU. The project folder holds a .env file with the live API keys for your seller accounts. Right next to it sit an old export from last quarter and the live orders database.

Bad spec: “Make a sales report for the week.” That's a gap in all three fields at once. The desired result is unclear, and the source isn't named. Worst of all, the agent has no idea that .env and the live database are off-limits.

Prompt:

GOAL
Build a sales report for March 10–16: a CSV table with the columns
“SKU, revenue, marketplace fee, cost of goods, margin %”.
Done when report_week.csv is in the /out folder and the revenue total
matches the sum of the rows.

CONTEXT
- Sales source: only the files in /data/export_amazon and /data/export_etsy.
- Cost of goods: the table /data/cost.xlsx (it's the primary source; do not use any others).
- Do not use the old export /data/archive_q4, it's outdated.

CONSTRAINTS
- Do not read or open the .env file.
- Do not connect to the live orders database or to the seller account APIs.
- Do not change or delete anything outside the /out folder.

STOP RULE
If the next step requires an action not covered by these three blocks
(a new data source, access to keys, writing outside /out), stop
and ask me one specific question. Don't guess.

Result: The agent works inside the boundaries you set. It reads only the specified folders, stays away from .env and the database, and drops the output in /out. If it needs an exchange rate or account data the spec doesn't cover, it stops and asks instead of digging into live sources. You check two things: the file is ready and the totals match, and no rules were broken (from the agent's action log).

04

Why It Works

The weakness. The agent doesn't know what you didn't say. If a prohibition isn't stated, it doesn't exist for the model. It doesn't “forget”; it simply has no signal. That's why, with a constraint missing, the agent calmly finishes the job and breaks the rule. It looks like a success, but the result is unusable.

The strength. An LLM agent is good at following what's stated directly and separately: goals, sources, prohibitions. Explicit blocks are easy to check, both for the agent and for you. The stop rule turns “guessing” into a question.

Control levers: - The CONSTRAINTS block is the most important one. If you're short on time, fill in at least this. Be specific: names of files, folders and systems, not “be careful.” - The CONTEXT block saves tokens. Name the primary source and list what to ignore. - The GOAL block with a done criterion protects you from half-finished work. - The stop rule: narrow or widen the list of triggers. For risky systems (money, production, customer data), keep just “ask before any write.”

One more caveat from the paper: the “best model” depends on the model × agent harness combo and on what you measure. That could be completion, correctness or consistency. Test your own combo on your own tasks, especially with incomplete specs.

05

Prompt Template

The paper has no ready-made prompt. This template is built from its three fields (goal, context, constraints) and its recommendation to ask before dependent actions.

GOAL
{what_you_need}. Format: {format}. Done when: {done_criterion}.

CONTEXT
- Primary source: {source}.
- You may also use: {allowed_extras}.
- Do not use: {outdated_or_irrelevant}.

CONSTRAINTS
- Do not read or open: {secrets_and_private_data}.
- Do not connect to: {production_systems}.
- Do not change or delete: {off_limits}.
- {other_rules}

STOP RULE
If the next action needs information or permission that isn't listed above,
stop and ask one specific question. Don't guess.

What to fill in: in {done_criterion}, put something verifiable: the file exists, the totals match, the test passes. In the “Do not read” field, list everything the agent shouldn't see: keys, customers' personal data, the live database. It's better to list all constraints up front than to tack them on as you go.

🚀 Quick start: paste this into the chat:

Here's a template for writing a task spec for an agent. Adapt it to my task: {your task}.
Ask me questions to fill in the fields.

[paste the template above]

The LLM will ask about data sources, the done criterion and, most importantly, what the agent must not touch. It'll borrow the structure from the template and assemble a ready-to-use spec. It helps to list your project's “danger zones” first: keys, production systems, other people's folders.

06

Limitations

⚠️ They measured the cost of gaps, not the template itself: the authors compared complete specs with incomplete ones. They didn't test whether this exact “goal / context / constraints” format improves results. The template above is our inference from their finding.

⚠️ Hidden requirements are baked into the test: the compliance check verifies requirements that were stripped from the task in the incomplete versions. The steep drop with missing constraints partly follows from how the test is built. But that's exactly the situation where the agent doesn't know the rule and doesn't ask.

⚠️ Clarifications were estimated on paper, not in live dialogue: nobody actually answered the agent's questions. The authors plugged in results from full-spec runs and estimated the potential gain. A real person might answer better or worse.

⚠️ Narrow task type: the tasks are terminal and office work, on sandboxed tools with a hard time limit. The conclusions about tokens and unfinished work partly depend on that limit. Whether this carries over to creative tasks and tool-free chats hasn't been tested.

⚠️ The task variants were written by a model: an LLM drafted the incomplete versions, and the authors checked them by hand. Real-world “leaky” specs can look different.

⚠️ There's no universal “best combo”: the same harness swap improves one model's results and hurts another's. The paper doesn't hand you a ready-made ranking for picking a tool.

07

How They Studied It

The researchers took 48 practical tasks from two existing benchmarks (Terminal-Bench 2.0 and Harness-Bench): folder permissions, audio transcription, log reports. For each one they wrote a complete spec plus six broken versions. In those, the goal, context or constraints were either vague or missing: 2 gap types × 3 areas.

Then they ran 5 models × 4 agent harnesses × 3 runs, 20,160 runs in total. They scored completion (a result was produced), constraint compliance (from the agent's action log) and success (both at once) separately. That's what exposed the cases where the agent “did great, but broke the rules.”

The results were surprising. Without constraints, the share of completed tasks sometimes went up: the agent cheerfully plowed through the work without a second thought for the rules. Success, meanwhile, dropped to zero. Missing goals and context led to unfinished work and token overspending. The token “savings” when information was missing turned out to be nothing more than unfinished work.

Here's how the authors estimated the payoff from clarifications: in runs where the agent asked a question, they swapped in the average result of the full spec for the same combo. It turned out that clarifications recover unfinished work, but do almost nothing for violated constraints. How often agents ask for clarification, and how much it helps, depends more on the agent harness than on the model.

08

Adaptations and Extrapolations

💡 Adaptation for an agent instructions file (CLAUDE.md / AGENTS.md): The paper directly recommends that harness developers build in “targeted clarification before dependent actions.” A practitioner can bake this into the instructions on their own:

STOP RULE (always)
Before any action that writes, deletes, sends, or reaches out
to an external system, check: have I been explicitly told this is allowed?
If not, stop and ask. Reading files outside the specified folders
and using secrets: only after explicit permission.

🔧 Technique: audit the spec before launch → catch the gaps before the agent gets to work. This isn't in the paper; it's our extrapolation from the three fields:

Here's my task spec for an agent: {text}.
Don't execute it. Check it against three fields: goal (is there a done criterion),
context (are the sources named), constraints (what must not be touched).
List what's missing and ask me up to 5 questions,
starting with the constraints.
09

Resources

  • AM-Bench: Understanding Agents under Task Underspecification across Models and Harnesses (Preprint)
  • Project repository: https://github.com/s4-lab-cuhksz/AM-Bench.git
  • Authors: Kaiyu Huang, Yiting Li, Angyang Gu, Pinjia He, Minchen Yu, Qingjiang Shi (Tongji University; The Chinese University of Hong Kong, Shenzhen)
  • Source benchmarks: Terminal-Bench 2.0, Harness-Bench; related work: ToolEmu, LHAW, UnderSpecBench, ClarifyBench, AppWorld-UL

Research digest

Key result

The agent says “done,” the output looks right, and a prohibition has been violated. If a constraint went unnamed, not one of the 20 “model + agent harness” combos completed the task correctly even once. The AM-Bench diagnostic lets you see in advance which gap in a spec costs the most: goal, context or constraints. The three gaps break an agent in different ways. No goal: the work is left unfinished. No context: the agent burns tokens. No constraints: rule compliance drops by 73 percentage points, while task completion itself barely suffers.

Principle

Before launching an agent, check the task against three fields. GOAL: what result you want and when it counts as done. CONTEXT: where to get the data, which source is primary. CONSTRAINTS: what must not be read, changed or touched. Add a stop rule: if an action depends on an unclear field, the agent asks a question. Write constraints explicitly and separately: to an agent, an unnamed prohibition simply doesn't exist. It's like an intern nobody told about the safe. He's not a troublemaker; he just didn't know.

Why it works

The model has no signal about a rule you never said out loud. It didn't “forget”; there's nothing to forget. That's why the agent calmly finishes the job and breaks the prohibition. Worse, it doesn't realize it should ask. The wild part: for some combos, the share of “completed” tasks actually went up. The dashboard is green, and the rules are broken. Missing information entirely hurts more than vague wording, in all three areas. So even a clumsy line about constraints beats a blank. Caveat: the test was deliberately built by stripping hidden requirements out of the task, and part of the drop comes from that. But that's exactly the situation where you forgot to write the prohibition. By the authors' estimate, clarifying questions mostly recover unfinished work. Violated constraints they barely fix. So write your prohibitions up front.

When to apply

Agents with file and terminal access → tasks near production data, access keys, a working database or other people's folders, especially when the agent can write and delete. If you're short on time, at least fill in the constraints block. NOT suited for creative tasks or tool-free chats: transfer to those wasn't tested. The authors didn't test the “goal / context / constraints” template either. They compared complete specs with incomplete ones. The template is our inference from their finding.

Mini recipe

1. Find the danger zones: list the keys, production systems, archives and other people's folders near the task. 2. Write a goal with a finish line: the output format and a verifiable sign it's done (the file is in the folder, the totals match, the test passes). 3. Name the primary source: list what to ignore. This saves tokens. 4. Put constraints in their own block: specific names of files, folders and systems. “Be careful” doesn't work. 5. Add a stop rule: “if you need an action outside these blocks, stop and ask one question.” For money, production and customer data, narrow it to “ask before any write.” 6. Check both outcomes: is the file ready, and were any rules broken. Check the second one in the agent's action log. 7. Test your own model + harness combo on your own tasks: there's no universal ranking; the same harness swap helps one model and hurts another.

Examples

[BAD]: `Make a sales report for the week` [GOOD]: `GOAL: a report for March 10–16 in CSV, columns “SKU, revenue, fee, cost of goods, margin %”. Done when report_week.csv is in /out and the revenue total equals the sum of the rows. CONTEXT: sales only from /data/export_amazon and /data/export_etsy, cost of goods from /data/cost.xlsx, do not use the /data/archive_q4 archive. CONSTRAINTS: do not open the .env file, do not connect to the live orders database or to the seller account APIs, change nothing outside /out. STOP RULE: if you need an action outside these blocks, stop and ask one specific question. Don't guess.` The bad request has gaps in all three fields at once. The agent doesn't know that `.env` and the live database are off-limits. With the good one, it stays within the boundaries and asks when data is missing.

In plain words

AI agents don't screw up at random; they follow strict laws of physics. The AM-Bench test exposed the obvious: models have no common sense and no telepathy. If you didn't spell out a constraint in plain block letters, then for the model it simply doesn't exist in nature. It doesn't forget the rules; it just never got the signal that there were any. So the model cheerfully reports success while your project goes down in flames.

It's like hiring an intern and tossing off: “go tidy up the warehouse.” Don't explain the end goal, and he'll shrug and wander off for coffee. Don't point out the right shelves, and he'll ransack the whole building and burn the workday for nothing. And if you forgot to shout “don't touch the box of crystal,” he'll chuck it in the dumpster with an employee-of-the-month smile. Technically he cleaned up; in reality it's a total fail.

The study broke these blunders down into three specific scenarios. First, no goal: the agent abandons the task half-done. Second, no context: without knowing the primary sources, the model wanders in circles and burns several times more tokens, flushing your budget down the drain. Third, and most toxic, no constraints: the task is 100% closed, but along the way the agent broke into prod or wiped the database.

They tested on benchmarks, but the principle holds for any automation. Ask Claude Code to calculate your marketplace margins, and with no prohibitions it'll go parse some old junk archive and overwrite your live .env file. Hook an agent up to your email, and it'll leak your database to competitors, simply because nobody slapped its wrist. Without explicit guardrails, an autonomous agent turns into a natural disaster.

Bottom line: drop the illusion that the model will “figure it out on its own.” Turn the test results into an ironclad three-point checklist before every launch. First lock in the final result, then the pointers to sources, and most importantly, a list of hard prohibitions. Otherwise you'll get a perfectly closed ticket at the cost of a dead business.

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 AM-Bench: Which Gaps in an Agent's Task Do the Most Damage arXiv:2610.18090

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