Skip to content

Checking your reading list…

Retry

Stay curious. Build better.

Appearance

Choose how BestHub looks on this device.

Changes apply immediately.

Search articles

Open Discover with these filters

Suggested searches

Code Agents Beat Video Models 0.923 to 0.670 on 500 Visual Reasoning Tasks

In a 500-task visual reasoning benchmark, code agents like Codex (0.923), Claude Code (0.894), and Gemini CLI (0.893) significantly outperformed the best direct video generation model (0.670) by writing programs to render videos, revealing code's superiority in geometric perception and explicit reasoning over pixel-level generation.

Benchmark Setup

The study evaluates 500 visual reasoning tasks. Each task provides a 1024-pixel first frame and a natural-language instruction; the expected output is a video that completes the described action. The correct video is largely determined by the first frame and the instruction. Two submission methods are compared: (1) code agents write a program that renders the video using CPU and standard image libraries, and (2) video generation models produce the video directly via denoising. Scoring uses the original official evaluator — traditional computer vision and OCR compare each output to a symbolic ground truth, yielding a per-task score 0–1, averaged over 500 tasks. Code agents cannot see the ground truth, cannot call image/video models, have a 30-minute time limit per task, and receive zero if no video is submitted.

Overall Results

Codex (backed by gpt-6-astra): 0.923

Claude Code (Fable 5.1): 0.894

Gemini CLI (Gemini 3.1 Pro): 0.893

Best video model (RL-trained with a scorer): 0.670

Best open-weight model (GLM-5): 0.572 — higher than every other video model except the RL-trained one.

All three closed-source agents run with default CLI settings, no extra prompts. Open-weight models (23 tool-capable models) are tested via OpenCode.

Concrete Task Examples

Tangent Circles (unseen family)

Tangent circles example
Tangent circles example

Three circles; the task is to mark the tangent point. Codex draws a small circle at the contact of the dark-blue and teal circles — score 1.000 . The video model draws a line from the dark-blue circle to the non-tangent yellow circle — score 0.000 . All three agents average 1.000 on this family.

Sliding Puzzle 1–8 (seen family)

Arrange tiles 1–8 in order with the blank in the bottom right. Codex solves from a shuffled board to the goal — 1.000 . The video model stops at a still-scrambled board — 0.253 . Agents average 1.000 .

Animal Size Sorting (unseen family)

Animal sorting example
Animal sorting example

Animals must stand on a line ordered by size. Codex places frog, fox, pig, bear, rabbit — 1.000 . The video model multiplies animals and pushes the largest frog to the back — 0.146 . Agents again average 1.000 .

Category Breakdown: Perception vs. Transformation

Across five task categories, the perception gap is widest, transformation narrowest.

Perception (finding/measuring objects in flat geometry): Codex 0.942 , video model 0.488 . Programs count connected same-color regions precisely; this accounts for part of the gap.

Transformation (objects changing over time): video model 0.840 , Codex 0.908 . Video models encounter more temporal changes in training data.

Seen vs. Unseen Split

The paper splits tasks by whether the video model saw similar frames during training.

Seen half: video model 0.808

Unseen half: video model 0.532

Tasks use flat colors and regular geometry — easy for programs. Real-world textures, occlusion, and lighting are absent. Code agents can iterate up to 30 minutes; video models generate once.

Code Strategy Analysis: Depictive vs. Propositional

The authors took 1,385 correct programs from the three closed-source agents and re-ran each on a different instance from the same task family. Programs that re-detect colors, regions, and objects on the new image are depictive ; programs with hard-coded coordinates and colors are propositional .

Code strategy comparison
Code strategy comparison

Perception tasks: 67% depictive overall.

Knowledge-heavy tasks: depictive drops to 27% .

Codex (highest total score) uses depictive only 35% ; Claude Code uses 61% depictive.

Example: on a "circles growing, pick next" task, both agents pick correctly. Claude Code measures diameters 21, 39, 57 px (tolerance 18), infers next = 75, then matches color/shape/size. Codex's program contains hard-coded pixel coordinates and merely circles the chosen option.

Efficiency Comparison

The three closed-source agents' scores differ by only 0.030.

Codex: median 22 seconds , average 3.2 tool calls .

Claude Code: ~3× tool calls, ~4× input tokens.

Gemini CLI: ~8× tool calls, ~12× input tokens.

Open-Weight Model Results

Gemma 3 27B, Gemma 3 12B, Llama 3.3 70B, Magistral Small: zero tool calls across 500 tasks, score 0 .

Qwen3-Coder-Next: submitted 498 videos, score 0.264 .

References

Paper: arXiv:2611.34813 — https://arxiv.org/abs/2611.34813

Figure 1: https://arxiv.org/html/2611.34813v1/fig_teaser.png

Figure 4: https://arxiv.org/html/2611.34813v1/fig_comparation_G-131.png

Project page: https://solve-vision-with-code.com/

Code example

👀点击关注
AI前沿快速Follow
About this article

For questions about attribution, corrections or content rights, please contactadmin@besthub.devand we will review it promptly.

video generationbenchmarkvisual reasoningcodexprogram synthesisGemini CLIClaude Codecode agents

Discussion 0

Questions, practical examples and thoughtful responses.

Open full discussion