Predictive Code Worlds: Write the World First, Then Predict It, for Robot Code Agents
Ge WangZhixin MaiZheng SunMingkai JiaZiyue ZhuZhen Li
Ge Wang
Zhixin Mai
Zheng Sun
Mingkai Jia
Ziyue Zhu
Zhen Li
+6
Predictive Code World (PCW) has the agent first write an executable model of its task world—keeping measured facts, predicting each action's changes, and judging goal progress—and then write its skill on top of it, so that once the skill works the same world also predicts each subgoal's observable outcome. Because these predictions come from the same agent as the skill they check, they are not trusted by default: faults injected during development label their verdicts, and only predictions certified on those labels may roll the program back. With the small open-weight Qwen3.8-Flash and self-improvement, PCW reaches 89.4% success on 80 LIBERO-Pro tasks, surpassing ASPIRE with the same model, a larger open-weight model, and closed-source Claude Opus 4.6, with gains carrying over to Robosuite and BEHAVIOR-1K; under disturbances, world predictions catch otherwise-unnoticed failures and recover from them.

arXiv ·
· November 27, 2026