World models
Streaming Code World Model: a coding agent as the brain of a world
An open research project makes Code World Model generate video chunk by chunk as the world unfolds. It is not real time yet, but it points at worlds whose rules are written and rewritten as code while you play.

Code World Model, from Westlake AGI Lab, starts from a simple idea: let a coding agent be the brain of the world. The agent updates the world’s state by writing and revising executable code, a lightweight compiler turns that state into a rough proxy video, and a video model renders the final high-quality frames. Consequences persist because they live in code, not in the model’s short visual memory.
The original system rendered whole clips at once. A new open project, Streaming Code World Model by Tingting Liao and Guangyi Liu, makes it causal: video is generated in chunks of about 0.71 seconds as the world unfolds, each one conditioned on the start image, the proxy so far and the previous chunks, with no peeking at the future. That is the property you need for anything interactive.
What is in the release
- Causal streaming with a sliding six-chunk attention window and a reusable cache.
- Diffusion forcing with a noisy history, which slows the drift that degrades long generated sequences.
- Four-step distillation that is nine times faster than 35-step sampling and, by the authors’ measurements, more accurate.
Checkpoints are published on Hugging Face as LoRAs for the released Code World Model base, trained on driving-simulator clips of a pedestrian followed by a third-person camera.
The honest caveat
It is not real time. A chunk takes about 5.1 seconds to render on one H200, with peak memory around 108 to 123 GB. This is a research release for people with datacentre hardware, and the authors say so plainly. For comparison, Skywork’s Matrix-Game 4.0 uses a similar code-plus-renderer split and reaches interactive speeds on a consumer GPU, but with fixed game rules rather than an agent rewriting the world.
Why it matters
Matrix-Game 4.0 shows that code-owned state makes generated worlds fast and stable. Code World Model asks the next question: what if the code itself is alive, written by an agent that responds to what you do? That is the shape of a truly generative game, where the rules can grow with the story.
Our take
Streaming is the step from impressive clip to living world. Pair an agent that writes the world’s logic with a renderer that can keep up, and the line between designing a game and playing one starts to blur. We expect the speed gap to close quickly.