AI Agent Open-Book vs. Closed-Book Performance: Failure Attribution Analysis
This article examines why AI agents often perform well in open-book settings but degrade sharply in closed-book conditions, and how to attribute those failures correctly. It treats evaluation conditions as quantifiable variables, then walks through three key findings: reset capability delivers more value than precise state injection, failures cluster at specific pipeline stages rather than spreading evenly, and available resources shape the strategy an agent chooses. It closes with a practical reliability checklist covering the environment, evaluation, annotation, policy, cost, and reproducibility layers.
1. Background: Locating Accurately Is Not the Same as Acting Accurately
A pattern that keeps recurring in AI agent evaluations is that the same model performs strongly under open-book conditions (access to documents, retrieval indexes, prior context, and tool outputs) but drops significantly under closed-book conditions (only parameterized knowledge and limited context). The magnitudes reported in the source material are roughly 80% open-book versus under 50% closed-book. That gap alone does not mean the model has become “dumber”; it shows how sensitive results are to evaluation conditions.
Note that this article does not reference any specific third-party model or product. Phrases such as “a coding agent” and “a controlled experiment” are used only as neutral technical background. The core conclusions can be abstracted into three points:
- Perception accuracy and execution accuracy are two different capability curves; locating the right target does not mean producing the right action sequence.
- Failures cluster by stage, and different agents often fail at the same step.
- The policy-generation path is constrained by environmental resources; when resources are available, agents tend to train a policy themselves rather than hard-code one.
2. Open-Book and Closed-Book: Treat Evaluation Conditions as Variables, Not Backdrop
Many teams treat “open-book/closed-book” as a narrative label. In practice it should be modeled as a quantifiable experimental variable, single- or multi-dimensional. At minimum, control these dimensions explicitly:
| Dimension | Open-book setting | Closed-book setting |
|---|---|---|
| Context window | Long documents and retrieval snippets can be injected | Only the task description and a few examples |
| Tool availability | Compile, test, and log query fully enabled | Basic read/write only |
| Feedback loop | Retrying based on errors is allowed | Single attempt or very few retries |
| State visibility | Full environment state visible | Only local observations visible |
When all of these dimensions tighten at once, the performance drop is a cumulative effect and cannot be attributed simply to “insufficient model capability.” The safer engineering approach is to ablate dimension by dimension, obtain each factor’s contribution, and then decide where to invest optimization effort.
3. Key Finding 1: Reset Mechanisms Beat Precise State Injection
One counterintuitive but highly practical conclusion from the controlled experiment is that giving an agent a reset capability yields more benefit than giving it a precise state description.
There are two reasons. First, a precise state is essentially a one-time snapshot; once the environment changes, the snapshot is immediately stale, and the agent may act on outdated information with greater confidence and therefore a more confident mistake. Second, reset provides an idempotency guarantee, letting the agent convert irreversible risk into reversible operations by “returning to a known-good state and retrying.”
The illustrative pseudocode below expresses a reset-first execution strategy:
def run_with_reset(task, env, max_steps=20):checkpoint = env.snapshot() # known-good baselinefor step in range(max_steps):obs = env.observe()action = policy(obs, task)result = env.apply(action)if result.failed:env.restore(checkpoint) # idempotent rollback, not state patchingcontinueif result.done:return resultreturn TimeoutError
Practical points:
- Make “rollback-able” a first-class citizen of the environment, ahead of “state can be precisely described.”
- Define a minimum safe baseline for each task type, so the agent never rolls back to an already corrupted state.
- Count rollbacks against the cost budget so that unlimited retries do not mask policy defects.
4. Key Finding 2: Staged Annotation and Clustering of Failures
After annotating thousands of failure samples across multiple agents stage by stage (the source material cites on the order of ten agents and more than six thousand failures), failures turn out not to be evenly distributed but concentrated in a few stages. A typical stage breakdown could be:
- Requirement understanding and task decomposition;
- Environment and dependency localization;
- Code/action generation;
- Execution and verification;
- Error diagnosis and repair;
- Wrap-up and result delivery.
The annotation schema should use a triple of “stage + error type + recoverable,” for example:
{"stage": "diagnose", "type": "wrong_root_cause", "recoverable": true}
Three direct benefits follow. First, common bottlenecks can be localized, shifting optimization from “swap the model” to “shore up the weak link.” Second, a layered evaluation set can be built, so overall accuracy stops hiding defects in critical stages. Third, it can drive tool-side changes, for example strengthening the supply of logs and monitoring/alerting information at the diagnosis stage instead of continuing to expand context.
5. Key Finding 3: Resource Availability Determines the Policy-Generation Path
In robot tasks that have compute and a training library available (such as a soccer adversarial scenario), agents are more inclined to train a policy themselves; when resources are constrained, they degrade to stitching rules together or imitating examples. This suggests that an agent’s behavior distribution is a function of environmental resources, and evaluation conclusions must state the resource conditions, otherwise they are not reproducible.
The engineering implication is that if you want an agent to reliably run the “train-evaluate-iterate” loop, compute scheduling, dataset management, and experiment tracking need to be exposed as callable general capabilities (container platforms, object storage, logging services, monitoring and alerting, and similar general categories), rather than having the agent “imagine” in a prompt that these capabilities exist.
6. An Actionable Reliability Improvement Checklist
- Environment layer: implement snapshots and idempotent reset first, and define an explicit whitelist of irreversible operations;
- Evaluation layer: ablate open-book/closed-book by dimension and output per-factor contribution;
- Annotation layer: unify stage and error-type definitions and build a searchable failure library;
- Policy layer: add tools targeted at per-stage weaknesses rather than expanding context indiscriminately;
- Cost layer: set budget caps and circuit-breaker conditions for retries and training;
- Reproducibility layer: evaluation reports must record resource conditions and version information.
7. Conclusion
The pronounced open-book versus closed-book gap is fundamentally the combined result of evaluation conditions, environment reversibility, and resource availability. Putting reset ahead of precise state, annotating failures down to stage granularity, and writing resource conditions into evaluation conclusions are three improvement paths that can be executed immediately. For teams that want to build reliable agents, this approach has more long-term value than chasing a single leaderboard score, and it is also easier to standardize on top of general cloud capabilities such as Baidu AI Cloud.
