Skip to content
forall-labsPublic

About

How open-weight models fail at writing robot code, and the smallest fix for each failure.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

OpenCaP

What Does the Success Rate Hide?
Auditing Open-Weight Code-as-Policy Benchmarks for Deployment

Sajjad Pakdamansavoji
Forall Labs

Project page Data

Write-up License: MIT Python 3.10+


Code-as-policy agents write programs that control robots, and benchmarks rank them by success rate. OpenCaP re-runs one of those benchmarks, CaP-X, with 21 open-weight models (0.6B to 32B) on a machine we control, and asks what that rate leaves out. For every failing program we look for the smallest edit that makes it work, keeping the model's own code, and tag each cause the edit had to fix.

Highlights

  • Failure type. A program can raise an error, or run to completion while moving the arm wrongly. With the privileged API, 51 of 70 failing programs fail silently, and the share rises with model size, from 10 of 24 up to 2B to 13 of 13 at 12B and above. A retry loop gets no error message for those.
  • Protocol. Seventeen bugs in our own pipeline produced plausible scores instead of errors. Six of them sat in the serving stack, which a closed API hides.
  • Granularity. A score of 0/30 covers both one-line fixes and rewrites, and scores do not transfer: success falls from 26.5% with the privileged API to 2.8% with the sensor API. At the sensor levels, coordinate-frame errors go from 4% to 47% of failing programs and misread API calls from 26% to 60%.

How it works

  1. Run the grid. 21 models × 4 tasks (cube lifting, cube stacking, nut assembly, spill wiping) × 3 API levels, 30 fixed scenes per cell, greedy decoding through vLLM: 7,560 episodes. The retry loop, ablations, controls, sampled programs and superseded collections bring the released total to 38,250.
    • S1 (privileged API) gives the model high-level helpers such as get_object_pose and goto_pose.
    • S3 (sensor API) removes them: only perception (SAM3, Molmo, Contact-GraspNet), solve_ik, move_to_joints and the gripper.
    • S4 also removes the worked example.
  2. Repair minimally. Each failing program gets the smallest edit that makes it pass, keeping the model's code. A repair is accepted when no scene fails in all k draws, where k is calibrated per task on the task's own reference program.
  3. Tag the cause. Each repair is tagged with one tag per distinct cause, in six families (SYNTAX, STRUCTURE, INTERFACE, SEMANTIC, TRAJECTORY, FRAME).

The tags were produced by a language model (Claude Opus 5) reading each program against its verified repair, and checked by an independent model rater from a different family (GPT-6 Astra) on a blind 60-program sample: per-family κ 0.82 for FRAME and 0.87 for INTERFACE. No human has rated the packet; artifacts/second_rater/ is ready for one. See the write-up for the defect analysis: method, tables, checks and limitations.

Installation

git clone https://github.com/forall-labs/OpenCaP && cd OpenCaP
python -m venv .venv && source .venv/bin/activate
pip install -e .                 # analysis and reports (CPU)
pip install -e ".[serve]"        # adds vLLM to collect new trials (GPU)

Collecting new trials also needs a CaP-X checkout and its simulators; scripts/bootstrap_server.sh clones, patches and verifies one.

Data

Everything is public at savoji/OpenCaP on Hugging Face: all 38,250 episodes (the main evaluation, retry loop, ablations, controls, sampled programs and superseded collections), and the 239 failing programs with their tags and repairs.

from datasets import load_dataset

programs = load_dataset("savoji/OpenCaP", "failing_programs")
episodes = load_dataset("savoji/OpenCaP", "episodes", split="main")

Reproducing the results

On a CPU, with no account or token. Scripts that read traces download them from the dataset:

pip install -e ".[paper]"
python scripts/claims_register.py                     # 43 claims, re-derived from the data
python scripts/silent_failure_report.py               # silent failures by API level and size
python scripts/cross_tier_report.py --no-truncated    # what fails, by defect family
python scripts/m1_report.py                           # the retry loop
python scripts/robustness_report.py --hub             # robustness checks
python paper/figures/collect_data.py && python paper/figures/make_figures.py
python -m unittest discover -s tests

docs/REPRODUCE.md lists the script behind each number in the paper.

Repository layout

opencap/        the harness: models, cells, trace store, result parsing, statistics, CLI
scripts/        collection (run_*.sh, serve_vllm.sh), repair verification, and every report
tests/          controls and statistics, not only code (Wilson and McNemar against published values)
results/        tags, minimal repairs, verification verdicts and references
artifacts/      the cross-tier report page and the second-rater packet
paper/          figure scripts and the data they plot
docs/           REPRODUCE.md, the script behind each number; WRITEUP.md, the defect analysis
website/        the project page (GitHub Pages)

Citation

@misc{pakdamansavoji2026opencap,
  title  = {What Does the Success Rate Hide? Auditing Open-Weight Code-as-Policy Benchmarks for Deployment},
  author = {Pakdamansavoji, Sajjad},
  year   = {2026},
  note   = {Forall Labs. arXiv link to follow},
  url    = {https://forall-labs.github.io/OpenCaP/}
}

License

The code is released under the MIT License. CaP-X and the models it runs keep their own licenses.

Acknowledgements

OpenCaP is built on CaP-X. We thank its authors for releasing the benchmark, and the authors of Qwen3, Qwen3-VL, Qwen3.5, Gemma 3, vLLM, SAM3, Molmo and Contact-GraspNet for their models and tools.

About

How open-weight models fail at writing robot code, and the smallest fix for each failure.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages