ContractBench: Can LLM Agents Preserve Observation Contracts?
This paper introduces ContractBench, a deterministic benchmark revealing that current frontier LLM agents frequently fail to preserve the temporal validity and byte-level integrity of observation contracts (such as session tokens and URLs), a capability that does not scale monotonically with model size and requires specific failure-aware training to improve.
Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer
The Big Idea: The "Digital Handoff" Problem
Imagine you are hiring a very smart, but slightly clumsy, robot assistant to run errands for you. You tell the robot: "Go to the bank, get a temporary key, and use that key to open the safe."
In the real world, if the robot drops the key, changes the shape of the key, or tries to use the key after it has expired, the safe won't open. The robot failed, not because it didn't know what to do, but because it failed to handle the specific details of the handoff.
This paper calls these details "Observation Contracts."
- The Contract: When a tool (like a bank API) gives the robot a piece of data (like a temporary password or a signed link), that data comes with two invisible rules:
- The Expiration Date: You must use it now, or it becomes useless.
- The "Do Not Touch" Rule: You must copy it exactly, letter-for-letter. If you change even one comma or space, it breaks.
The authors found that even the smartest AI agents today are terrible at following these rules. They often drop the key, melt it, or try to use it the next day.
The New Test: CONTRACTBENCH
To prove this, the researchers built a new test called CONTRACTBENCH. Think of it as a "driving test" for AI agents, but instead of driving a car, they have to navigate a digital obstacle course where every step requires passing a fragile, time-sensitive package to the next person.
- The Course: It has 33 different scenarios (like downloading a file with a link that dies in 10 seconds, or logging in with a code that must be typed perfectly).
- The Rules: The test is run by a strict computer program (no human judges). It uses a "virtual clock" to see if the agent is too slow, and a "digital fingerprint scanner" to see if the agent changed a single letter in the code.
- The Score: If the agent breaks the time limit or messes up the spelling of the code, they fail.
What They Discovered (The Findings)
The researchers tested 38 different AI models (including the newest, most famous ones from OpenAI, Anthropic, Google, and open-source teams). Here is what they found, translated into everyday terms:
1. Even the "Smartest" Robots Fail
The Finding: No model passed 80% of the test. The best one (Claude Opus 4.6) only got about 78%.
The Analogy: Imagine the smartest student in the world taking a math test. They can solve complex calculus problems, but if you ask them to copy a 10-digit number perfectly without making a typo, they still get it wrong 22% of the time. Being "smart" doesn't mean being "careful."
2. The "Magic Cliff" (Qwen 3.5)
The Finding: In one specific family of models (Qwen 3.5), there was a sudden jump in ability. The small 4-billion-parameter model got 0% correct. The slightly larger 9-billion model jumped to 56%.
The Analogy: It's like a video game character who is useless until they reach Level 9. At Level 8, they can't even hold the key. At Level 9, they suddenly learn how to hold it gently. This wasn't a slow improvement; it was a sudden "awakening" of a specific skill called restraint (knowing not to change the data).
3. Bigger Isn't Always Better (The GPT-5 Rollercoaster)
The Finding: As the GPT-5 family of models evolved, their performance went up, then crashed, then went back up.
The Analogy: Imagine a chef getting a new recipe book.
- Chef A (GPT-5): Makes a perfect cake.
- Chef B (GPT-5.1): Gets a "smarter" version of the book but starts adding too much sugar and ruining the recipe (specifically, they started changing the ingredients instead of copying them).
- Chef C (GPT-5.2): Fixes the recipe and goes back to making perfect cakes.
The paper suggests that making an AI "smarter" or "more conversational" can sometimes make it worse at following strict, boring rules.
4. The "Base" Models Can't Do It
The Finding: Models that haven't been "trained" to chat or follow instructions (Base models) got 0% on the test. Only models that had been taught how to follow instructions (Instruct models) could pass.
The Analogy: A raw lump of clay (Base model) can't hold a shape. You have to sculpt it (Post-training) to make it hold a cup of water. The ability to follow these contracts isn't natural; it has to be taught.
5. The "Hint" Works
The Finding: When the researchers told the AI exactly what it did wrong (e.g., "You changed a letter in the code"), the AI could fix its mistake and pass the test.
The Analogy: If you tell a child, "You dropped the ball," they might try again and catch it. But if you just say, "Try again," they might drop it again. The specific feedback was the key to fixing the error.
Why This Matters (According to the Paper)
The paper argues that we have been testing AI on whether they can "solve a puzzle" or "write a story." But in the real world, AI agents are often used to do jobs where precision is everything.
If an AI agent is managing your bank account, it can't afford to change a single digit in a transaction code. If it's managing a server, it can't afford to use an expired password.
The Conclusion: Current AI agents are like brilliant but clumsy interns. They understand the big picture, but they keep dropping the fragile tools they are handed. To make them reliable for real-world jobs, we need to stop just making them "smarter" and start teaching them to be more careful and more precise with the digital contracts they receive.
Drowning in papers in your field?
Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.