Kodecz: a video editor built for AI agents, how agents fail when they write video as code, and how to check it from inside the render

Coding agents now write videos as code: a web page (HTML, CSS, React, Web Animations) is rendered frame by frame into an MP4. When they fail, it is rarely a syntax error. In 27 defects of our own production videos, 21 were relations between two things — text over a face, motion out of step with speech, a cut in the middle of a word — and 6 repeated a lesson that was already written in the agent's instructions. Documents alone did not prevent them. This paper is about the other half of the problem: what an editor must give an agent so that the agent can see, check and fix a video. We describe Kodecz, an open-source (Apache-2.0) video-as-code engine designed for agents rather than for people at a timeline: the page as the format, a declared timeline in which frame N depends only on N, a single-frame preview with the same pixels as the render, the scene of every frame read from inside the renderer, an automatic frame check that answers with the frame, the element and the reason, brand identity and editing techniques as data, and a written agent guide whose rules each say how they are checked. From public reports and published style guides we grew the 27 defects into 106 error classes, and we turned the classes into the Kodecz Bench: 5,007 cases, each a mutation of a correct scene, scored by deterministic oracles that read the render from the inside — no model judges another model. The same rule set drives the bench and the check a working agent runs, so what an agent is scored on is what it is asked to fix. Each rule and cross-checked against every other class (therule of one class flags another class's defect in 99 of 11,025 crossings, 0.9 %). In a first run with documentation only, oneagent (Claude Opus) erred in 22 of 139 scored cae a five-layer protocol for talking to agentsabout video; it is a design, and we make no claim about its effect before measuring it. Kodecz renders on the GPU (NVENC) and on the CPU (x264), without screenshots; the engine itself is described in a companion preprint. Files: kodecz-agentes-paper-en.pdf (English, mai-artigo-pt.pdf (Portuguese translation, samecontent). Code: https://github.com/konecz/kodecz

Authors

Publication Details

Journal
Figshare
Published
2026-11-01
DOI
https://doi.org/10.6084/m9.figshare.34880928
Primary Topic
Software Testing and Debugging Techniques
Type
preprint
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
preprint

Kodecz: a video editor built for AI agents, how agents fail when they write video as code, and how to check it from inside the render

Pedro Henrique Lahr
2 links
Figshare
Software Testing and Debugging Techniques
preprint

Kodecz: a video editor built for AI agents, how agents fail when they write video as code, and how to check it from inside the render

Pedro Henrique Lahr
preprint en

Abstract

Coding agents now write videos as code: a web page (HTML, CSS, React, Web Animations) is rendered frame by frame into an MP4. When they fail, it is rarely a syntax error. In 27 defects of our own production videos, 21 were relations between two things — text over a face, motion out of step with speech, a cut in the middle of a word — and 6 repeated a lesson that was already written in the agent's instructions. Documents alone did not prevent them. This paper is about the other half of the problem: what an editor must give an agent so that the agent can see, check and fix a video. We describe Kodecz, an open-source (Apache-2.0) video-as-code engine designed for agents rather than for people at a timeline: the page as the format, a declared timeline in which frame N depends only on N, a single-frame preview with the same pixels as the render, the scene of every frame read from inside the renderer, an automatic frame check that answers with the frame, the element and the reason, brand identity and editing techniques as data, and a written agent guide whose rules each say how they are checked. From public reports and published style guides we grew the 27 defects into 106 error classes, and we turned the classes into the Kodecz Bench: 5,007 cases, each a mutation of a correct scene, scored by deterministic oracles that read the render from the inside — no model judges another model. The same rule set drives the bench and the check a working agent runs, so what an agent is scored on is what it is asked to fix. Each rule and cross-checked against every other class (therule of one class flags another class's defect in 99 of 11,025 crossings, 0.9 %). In a first run with documentation only, oneagent (Claude Opus) erred in 22 of 139 scored cae a five-layer protocol for talking to agentsabout video; it is a design, and we make no claim about its effect before measuring it. Kodecz renders on the GPU (NVENC) and on the CPU (x264), without screenshots; the engine itself is described in a companion preprint. Files: kodecz-agentes-paper-en.pdf (English, mai-artigo-pt.pdf (Portuguese translation, samecontent). Code: https://github.com/konecz/kodecz

Figshare
Software Testing and Debugging Techniques
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.

Laika access coming soon
Kodecz: a video editor built for AI agents, how agents fail when they write video as code, and how to check it from inside the render — Pedro Henrique Lahr · Figshare (2026) | TGRS Research Map | TGRS