# Coding agents such as Codex beat video models on visual reasoning tests

Given the same picture and instruction, coding agents that write a program to draw the answer scored well above the best video generation model on VBVR-Pro-Bench. The tasks are simple, computer-drawn scenes, and the result is a preprint.

- Category: Agents
- Readiness level: II (Benchmarked) on Science Underway's four-step scale, as proposed
- Published: 2026-11-29
- Editor: Stefan Perdal
- URL: https://scienceunderway.com/articles/coding-agents-such-as-codex-beat-video-models-on-visual-reasoning-tests

## The study

Solve Vision with Code: Coding Agents Are Stronger Visual Reasoners Than Video Models (preprint, not peer reviewed). arXiv 2611.34813. https://arxiv.org/abs/2611.34813

## At a glance

- What it shows: AI coding assistants were asked to solve picture puzzles by writing a small program that draws the answer as a video. Three commercial ones scored about 0.9 out of 1. The best AI video generator, which had even been trained on these puzzle types, scored 0.67.
- What it does not show: It does not show that the coding approach works on real photos or footage. The puzzles are clean, computer-drawn scenes with flat colours and exact shapes, which suit programs well.
- Why it matters: Video generators are increasingly promoted as tools that can reason visually. For tasks whose answer follows exactly from the picture and the instruction, a coding agent is currently the more reliable route, and its working can be inspected.

## What the study shows

The test is VBVR-Pro-Bench, a public benchmark of 500 visual reasoning tasks built for video generation models. Each task gives a first image and a text instruction, such as drawing a path through a maze. The system must produce a video in which the task is carried out. A rule-based scorer then checks the video against the known answer and gives a score from 0 to 1.

The authors gave the same image, instruction and video format to coding agents. A coding agent is a command-line tool that drives a language model: it reads files, runs commands and edits code until it decides it is done. Here each agent had to write a Python program that draws the answer video. It could not call any image or video generator, saw no answers, had 30 minutes and got one attempt per task. The benchmark's own, unchanged scorer graded the result.

The authors report that three closed-model agents came first: Codex with gpt-6-astra scored 0.923, Claude Code with Claude Fable 5.1 scored 0.894 and Gemini CLI with Gemini 3.1 Pro scored 0.893. The best video model scored 0.670. That model had been trained with reinforcement learning, where a model learns from rewards, on the benchmark's own task types, using the scorer as its reward. Well-known commercial video models scored lower: Veo 3.1 reached 0.309.

The agents led the best video model in all five task categories. The gap was largest on perception tasks, such as finding and measuring objects, and smallest on tasks that transform objects over time. The authors caution that perception tasks are easy for code, which can measure pixels exactly.

They also tested 23 open-weight models, whose weights are public, through the open-source OpenCode agent. The best, GLM-5, scored 0.572. Most weaker open models scored low mainly because they delivered few or no videos: some never ran a tool, others stopped before running their code.

Cost varied widely among the leaders. Gemini CLI used about eight times as many tool calls as Codex and took about ten times as long per task, for almost the same score.

Finally, the authors re-ran successful programs on a different task of the same type. Some programs measured the new image and worked out the answer again. Others simply drew an answer the agent had already settled during its session, so they would draw the same, now wrong, answer. The authors report that neither style predicted the score.

## Our reading

In our reading, the headline result is solid on its own terms. Both routes were graded by the same deterministic scorer on the same 500 tasks, and the gap is large: about a quarter of the scale between the best agent and the best video model. The video models were not rerun, though. Their scores come from the published leaderboard, and they produce one sample each, while the agents could probe, test and revise for up to 30 minutes.

The bigger caveat is the kind of task. These scenes are drawn by code, with flat colours and exact geometry. An agent can in effect recover the recipe that drew the picture, then edit a few pixels. Real footage, with texture, shadows and clutter, would not allow that. So the finding is narrow but useful: when an answer can be computed exactly from an image and an instruction, writing code beats generating pixels today.

On our four-level readiness scale, this sits at level II, Benchmarked. The results are on a public benchmark with its official scorer. The agents themselves are off-the-shelf products, but the authors' pipeline, prompts and generated programs are not linked in the paper, so it does not yet meet level III.

The rest of the article (what it means, limits, what to watch) is free for members: https://scienceunderway.com/articles/coding-agents-such-as-codex-beat-video-models-on-visual-reasoning-tests

## How this was made

An AI model read the study and wrote this article in the structure Science Underway uses. An editor reviewed it and approved it for publication. Check the original study before you rely on the details.

---
Source: Science Underway, https://scienceunderway.com/. Please link to the article when you cite it.
