Coding Agents in Robotics: What Open-Book and Closed-Book Evaluations Reveal

    A reported success-rate gap of roughly 80% in open-book evaluation versus 47% in closed-book evaluation highlights how much coding agents can depend on external support when executing robotics tasks. This article examines the value of environment resets, stage-level failure analysis, task-completion metrics, and controls for agent-driven training, with practical recommendations for reproducible evaluation and reliable deployment.

    Coding agents are moving beyond code completion and script generation into robotics task execution. Unlike text-only programming, robotics requires perception, planning, tool use, action execution, and outcome verification. Small errors in any of these stages can accumulate over a long sequence of actions.

    The reported evaluation reveals a notable gap: one coding agent achieved a task success rate of approximately 80% under open-book conditions, but only about 47% under closed-book conditions. This is not simply evidence that the model cannot remember enough information. It raises a more fundamental question: when external documentation, tools, training libraries, and runtime feedback are removed, can the agent still turn understanding into executable actions?

    1. Open-Book vs. Closed-Book: External Support or Internal Capability?

    Open-book evaluation allows agents to consult documentation, retrieve examples, invoke tools, and read environmental feedback. It may also provide computing resources and training libraries. Closed-book evaluation more closely resembles resource-constrained scenarios, where agents rely primarily on knowledge encoded in their parameters, limited interaction, and their own reasoning.

    The contrast between roughly 80% and less than 50% success suggests that external context may be supporting a substantial share of the agent’s performance:

    • Documentation fills in interface details.
    • Examples reduce planning difficulty.
    • Environmental feedback enables timely error correction.
    • Training libraries allow agents to fit policies during task execution.

    Without these supports, agents must independently interpret the current state, select actions, and recover from errors. Lower success rates are therefore unsurprising.

    Evaluation should not reduce these differences to a single aggregate score. A more useful approach is a three-tier matrix covering open-book, partially open-book, and closed-book conditions. Each tier should track task completion, the stage of first failure, recovery success, tool-call counts, resource consumption, and reproducibility.

    Open-book results indicate deployment potential, while closed-book results provide a better view of baseline capability. For enterprise deployment, closed-book performance should serve as an entry threshold, with open-book capabilities treated as efficiency gains rather than a way to conceal underlying weaknesses.

    2. A Key Finding: Environment Resets Help More Than Exact State Injection

    The controlled experiments produced a counterintuitive but valuable engineering finding: adding environment reset capabilities was more effective than supplying exact state information.

    Exact state injection appears ideal. If an agent receives the robot’s position, joint angles, object poses, and task progress, why would it not make accurate decisions?

    In practice, exact-state interfaces are expensive to build, and temporal consistency is difficult to maintain. Injected states may also differ from the distribution used to train the policy. If state information is incorrect, the resulting errors can propagate through the planning chain. More fundamentally, real systems often cannot observe the full state, so agents must operate with incomplete information.

    Resets offer a different form of predictability. Returning an environment to a consistent starting point or checkpoint removes the effects of previous actions, makes failures reproducible, and enables repeatable comparisons.

    A reset does not avoid the state problem. It turns a complex state-repair problem into a more manageable problem of experimental control. Engineering teams should prioritize lightweight snapshots, task-level resets, checkpoint rollback, and randomized resets, then progressively improve state-observation interfaces.

    An illustrative evaluation loop is shown below:

    1. def evaluate(agent, env, task, budget):
    2. env.reset(seed=task.seed)
    3. obs = env.observe()
    4. for step in range(budget):
    5. action = agent.act(obs, tools=env.available_tools())
    6. result = env.step(action)
    7. record(
    8. stage=result.stage,
    9. error_type=result.error_type,
    10. first_failure=result.first_failure,
    11. recoverable=result.recoverable
    12. )
    13. obs = result.observation
    14. if result.done:
    15. break
    16. return summarize(records)

    The important element is not the interface naming, but the evaluation protocol: a fixed seed, an explicit reset, step-by-step stage and error logging, a bounded execution budget, and preservation of first-failure information. Comparisons between agents are meaningful only when that protocol is stable.

    3. Accurate Perception Does Not Guarantee Accurate Execution

    Robotics tasks are difficult because of their execution semantics. An agent may identify the correct object and generate a plausible plan, yet still fail during execution.

    For example:

    • A grasp angle may violate dynamics constraints.
    • A planned path may ignore collisions.
    • Tool calls may occur in the wrong order.
    • Control frequency may be incompatible with feedback latency.
    • Missing verification steps may leave errors undetected.

    In a text task, one mistake may affect a single answer. In a robotics task, one mistake can invalidate the next ten steps.

    Evaluation must therefore move beyond answer accuracy to ask whether the task was completed, where the first failure occurred, whether recovery was possible, and whether resource use remained controlled.

    At minimum, teams should record five categories of metrics:

    1. Task completion rate
    2. Distribution of first failures by stage
    3. Recovery success rate
    4. Average number of tool calls
    5. Resource consumption per task

    For long-horizon tasks, evaluation should also track error accumulation over time and deviations in key states. These measurements help distinguish inaccurate perception, infeasible planning, unstable execution, and missing verification.

    4. Stage-Level Failure Annotation: Shared Bottlenecks Across 10 Agents

    The reported experiments annotated 6,027 failures across 10 agents by execution stage. Different agents often failed at the same step.

    This finding matters because failures concentrated at a shared stage may point to a common problem rather than the idiosyncrasies of an individual model. Possible sources include environment interfaces, action spaces, observation formats, verification feedback, and task design.

    Stage-level annotation should divide tasks into perception, planning, tool selection, parameter generation, execution, verification, and recovery. It should record:

    • The first failure
    • The root-cause category
    • Whether recovery is possible
    • Recurring failure patterns

    These annotations enable comparisons across agents and help identify shared bottlenecks.

    Teams should avoid relying solely on aggregate failure rates. A more useful failure annotation schema includes the agent identifier, task family, execution stage, first-failure flag, error type, recovery attempts, and resource consumption.

    Annotation consistency also needs validation. Otherwise, different annotators may classify the same event differently—for example, as a planning failure rather than an execution failure.

    If multiple agents fail when generating tool parameters or interacting with the environment reset interface, improving those interfaces and the evaluation protocol may be more cost-effective than repeatedly switching models.

    5. Agent-Driven Training: Greater Capability, Greater Risk

    In soccer tasks, agents given computing resources and training libraries often trained their own policies instead of directly producing fixed rules.

    This behavior demonstrates an adaptive workflow: writing training scripts, tuning parameters, evaluating results, and iterating. It can improve performance on complex tasks, but it also creates engineering risks:

    • Training may be unstable.
    • Resource consumption may be difficult to control.
    • Policies may overfit the simulation environment.
    • Evaluation data may leak into training.
    • Trained artifacts may lack versioning and rollback mechanisms.

    Governance should include resource budgets and timeouts for training, sandboxed execution of training scripts, and separation of training and evaluation datasets.

    Agents should also record dataset versions, hyperparameters, random seeds, and artifact checksums. Training failures need fallback strategies, and the decision process should explicitly consider whether training is worthwhile rather than assuming it is always preferable to a direct policy.

    Agents may train autonomously, but the surrounding engineering system must make that process auditable, reproducible, and stoppable before costs or failures escalate.

    6. Deployment Priorities: Resets, Stage-Level Observability, and Closed-Book Baselines

    Four capabilities should take priority when evaluating and deploying coding agents for robotics.

    Environment Resets and Snapshots

    Treat resets and snapshots as core evaluation infrastructure. Support task-level resets, checkpoint resets, and randomized resets.

    Stage-Level Observability

    Use consistent interfaces to record stages, actions, errors, and recovery information. Retaining only the final success or failure result is not enough.

    Open-Book and Closed-Book Benchmarks

    Maintain both evaluation tracks, with a partially open-book tier to reveal tool dependence. Open-book evaluation indicates the efficiency agents can achieve with external support; closed-book evaluation tests baseline capability.

    Tool and Training Governance

    Establish tool allowlists, budgets, sandboxes, logging, versioning, and separation between training and evaluation.

    Conclusion

    The gap between roughly 80% open-book success and less than 50% closed-book success should not be reduced to a simple judgment about model strength. It is a reminder that robotics requires a broader evaluation framework.

    Accurate perception is only the starting point. The goal is accurate execution that is recoverable and reproducible.

    Environment resets can provide more value than exact state injection. Stage-level failure annotation can reveal bottlenecks shared across agents. Agent-driven training can improve adaptability, but it requires engineering controls.

    Making these capabilities part of the deployed system is essential to moving coding agents from impressive demonstrations toward reliable delivery in real robotics tasks.