Open-Book 80% vs. Closed-Book 47%: The Execution Gap in Programming Agents for Robotics
This article examines why programming agents for robotic tasks achieve around 80% success in open-book evaluations but only about 47% in closed-book settings. It defines the "execution gap" between understanding a task and actually completing it, analyzes its root causes, and argues that reset capabilities often outperform precise state injection in improving real-world performance. The article also covers stage-level failure annotation, the risks of autonomous training in robot tasks, and a practical evaluation framework for deployment-oriented teams.
Open-Book 80% vs. Closed-Book 47%: The Execution Gap in Programming Agents for Robotics
When evaluating programming agents on robotic tasks, a clear discrepancy emerges between open-book and closed-book conditions. The same class of agents can reach roughly 80% task success when given access to documentation, examples, tool descriptions, and partial environment information. But when restricted to task descriptions and interaction feedback alone—the closed-book setting—success drops to about 47%. This contrast exposes a fundamental issue: there is an execution gap between an agent that can “understand” a task and one that can actually “get it done.” For engineering teams working with real robotic systems, measuring capability purely by open-book accuracy is insufficient. Evaluation must incorporate state recovery, stage-level diagnosis, action execution, and resource usage into a unified framework.
1. Open-Book vs. Closed-Book: The Evaluation Paradigm Determines the Conclusion
Open-book evaluation typically grants the agent access to a fuller context: task documentation, API descriptions, example trajectories, environment state descriptions, and the set of available tools. It approximates “upper-bound capability with sufficient reference materials and assistance,” and suits the assessment of understanding, planning, and tool-selection potential. Closed-book evaluation restricts external prompts, providing only the task goal, essential interfaces, and interaction feedback. This more closely mirrors real deployments where information is incomplete, feedback is delayed, and the agent must recover from failures on its own.
The 80% versus 47% difference, therefore, should not be interpreted simply as “model degradation.” It is a capability gap exposed by changing evaluation conditions. In open-book settings, agents can lean on documentation and examples to compensate for gaps in state understanding and action planning. In closed-book settings, agents must independently maintain task state, select actions, handle anomalies, and recover from failures. Real-world robotic tasks more closely resemble the latter: sensors are noisy, actions have error margins, and environments change. Agents cannot always rely on externally injected precise hints.
From an engineering standpoint, a dual-track evaluation is recommended: open-book to identify capability ceilings and tool-use potential, and closed-book to assess deployability and robustness. The gap between the two can serve as a context-dependency metric—the larger the gap, the more the system relies on external state injection, example retrieval, or human fallback.
2. Seeing Correctly Is Not Doing Correctly: Sources of the Execution Gap
“Seeing correctly” typically manifests as scene understanding, object recognition, step planning, or state-question answering. “Doing correctly” requires that action sequences reliably accomplish the goal in a real environment. At least four types of loss exist between these two levels.
First, there is loss in mapping state understanding to action execution. An agent may correctly identify that “the ball is on the left and the robot must turn,” yet still fail at turn angle, velocity control, timing, or obstacle avoidance. Second, there is accumulated error. Robotic tasks tend to be long-horizon sequences; a small early deviation can amplify in later stages and ultimately cause task failure. Third, there is insufficient understanding of interface and constraints. The agent may know a certain capability should be called, but may not grasp its preconditions, return-value semantics, or retry policies. Fourth, there is inadequate recovery capability. Failures are inevitable in real tasks; the ability to detect anomalies, roll back to a safe state, and re-plan matters more than single-step prediction accuracy.
Evaluation metrics should therefore expand from “whether the answer is correct” to include “whether the action is executable, whether failures are recoverable, and whether stages are diagnosable.” In addition to task success rate, teams should record action failure rate, retry count, state-recovery success rate, per-stage time consumption, and safety-violation frequency.
3. Adding Reset Capability Beats Injecting Precise State
Controlled experiments show that, when improving robotic task performance, providing the agent with “reset capability” often outperforms providing “precise state.” This finding warrants closer examination.
Precise state injection tells the agent “what the world currently looks like”—object coordinates, joint angles, or environment layout. It reduces perception uncertainty but does not necessarily solve the policy-execution problem. The agent may still not know how to sequence actions, how to fall back after failures, or how to handle timing. Reset capability, by contrast, provides a mechanism for “returning to an executable state after a failure.” It allows the agent to recover through trial and error, preventing one mistake from cascading into a full sequence failure, and it reduces the difficulty of maintaining task state.
From an engineering perspective, reset is not simply a restart. It should be designed as a hierarchical primitive: a lightweight reset can restore a local subtask, a checkpoint reset can return to the most recent safe state, and a global reset can restore the initial environment. Evaluations should log the number of resets, the cost of each reset, and the post-reset success rate. A system that depends on frequent global resets may have a lower true efficiency than its surface-level success rate suggests.
def evaluate_agent(agent, tasks, mode, reset_policy):results = []for task in tasks:env = make_env(task)if mode == "open_book":agent.set_context(docs=True, examples=True, tools=True)else:agent.set_context(docs=False, examples=False, tools="minimal")for stage in task.stages:obs = env.observe()if reset_policy == "reset":action = agent.act(obs, can_reset=True)elif reset_policy == "precise_state":action = agent.act(obs, injected_state=env.precise_state())else:action = agent.act(obs)ok, failure_type = env.step(action)log(stage.name, action, ok, failure_type)if not ok and reset_policy == "reset":env.reset_to_checkpoint()results.append(env.summary())return results
The pseudocode above expresses an evaluation principle: reset policy should be treated as an independent variable for comparison, not hidden inside the environment. Only by comparing under identical tasks, identical budgets, and identical safety constraints can conclusions carry reference value.
4. Stage-Level Failure Annotation: Common Bottlenecks Behind 6,027 Failures
After stage-by-stage annotation of 6,027 failures across 10 agents, a notable pattern emerges: different agents often fail at the same step. This suggests that failures are not entirely random, nor are they merely individual agents’ strategy defects. Rather, the task structure contains common bottleneck stages.
The value of stage-level annotation lies in decomposing end-to-end “failure” into localizable problems. Tasks should be divided into stages such as perception, planning, tool invocation, action execution, anomaly recovery, and acceptance verification. Each stage should have defined failure types: state misjudgment, action out-of-bounds, interface misuse, timeout, retry exhaustion, or safety-check failure. By computing per-stage failure ratios, failure co-occurrence relationships, and post-reset recovery rates, teams can identify improvement priorities.
If multiple agents concentrate their failures at the same stage, engineering teams should first examine the task design, interface semantics, and feedback signals of that stage—rather than blindly increasing model scale. Common improvements include: adding stage-level feedback, reducing ambiguity in the action space, providing verifiable intermediate states, adding failure detection and rollback strategies, and designing dedicated tools or constraint checks for that stage.
5. Autonomous Training in Soccer Tasks: Capability and Risk Coexist
In soccer-style robot tasks, when the environment provides GPU resources and training libraries, agents often attempt to train their own policies. This reflects a higher-order capability: instead of merely invoking pre-built policies, the agent can construct training pipelines, adjust parameters, and iterate on strategies based on task feedback. For complex continuous-control tasks, this autonomous training capability may be more valuable than one-shot planning.
But autonomous training also introduces new evaluation dimensions. First, resource budget: how much GPU time is consumed and whether limits are exceeded. Second, safety boundaries: whether training code runs in a sandbox and cannot corrupt the environment or access unauthorized resources. Third, result verification: whether trained policies undergo independent validation, and whether they are effective only within the training distribution. Fourth, reproducibility: whether random seeds, data versions, and training logs are complete. Fifth, failure recovery: whether the system can roll back when training fails or the policy degrades.
Evaluation of agents should therefore record not just the final success rate, but also the tool-use trajectory, training trigger conditions, resource consumption, and policy verification results. Autonomous training capability is a plus—but it holds engineering value only when the budget is controllable, the process is auditable for safety, and the results are verifiable.
6. Evaluation Recommendations for Real-World Deployment
Based on the observations above, we recommend establishing the following evaluation matrix:
- Dual-track open-book and closed-book evaluation to quantify context dependency.
- Grouped comparison between reset capability and precise state injection to distinguish “insufficient information” from “insufficient execution.”
- Stage-level failure annotation to identify common bottlenecks and failure-type distributions.
- Balanced action-level and recovery-level metrics, avoiding over-reliance on task success rate alone.
- Resource quotas, sandboxing, and result review for autonomous training capabilities.
- Retention of failure sample libraries and reproduction scripts to support regression testing.
The value of programming agents in robotic tasks ultimately depends not on how many steps they can answer correctly under open-book conditions, but on whether they can reliably complete tasks under closed-book conditions, noise, failures, and resource constraints. The gap between 80% open-book and 47% closed-book is a reminder: evaluation design itself is part of the capability boundary. Only by integrating reset mechanisms, stage-level diagnosis, action execution, and autonomous training into a unified framework can we more accurately determine whether an agent truly possesses the execution capability required for robotic tasks.
