MiMo Code: Three State Machines Behind a Long Task
Xiaomi open-sourced MiMo Code under MIT on 2026-06-10: a terminal coding agent built on OpenCode, aimed at tasks that run for hundreds of steps. In its own double-blind test, 1,213 paired runs across 576 developers and 474 repositories, the win rate against Claude Code sat near 50% below 200 steps and rose above 65% past it. The article explains that gap with three time scales: computation inside a turn, memory across turns, evolution across sessions.
Drawn out, each time scale is a small state machine, and in each one the runtime takes a decision away from the model doing the work: the judge takes the plan choice, the verifier takes the stopping call, the writer takes the memory, and two maintenance agents take the pruning.
Computation: one turn, four exits
Max Mode samples five plans in parallel at temperature 1 and never executes them; the same model judges the plans and one gets to run. That buys 10-20% on SWE-Bench Pro for four to five times the tokens. The Goal verifier is the cheaper lever and the one that decides how a turn ends: a separate call with the same conversation and the real tool outputs, no part in the work, so it has no interest in agreeing that the task is finished.
Every exit but one costs a verifier call, and the exception is a counter in the runtime, not a judgement. The verifier is the only state in the graph that can refuse the agent’s answer, which is why it holds the same context and none of the work. Two further compute levers do not change the graph: the constrained command syntax is design intent, not migrated, and Dynamic Workflow moves orchestration out of the prompt into a sandboxed script whose results land on disk after every agent() call.
Memory: the window is a disposable unit
Checkpoints fire at roughly 20, 45 and 70% of the budget, not at 95%. Extraction needs room to read, hold an interpretation and write, and the middle of a long context is where attention is weakest, so the compression cannot be scheduled for the moment the window is nearly gone. The main agent does not maintain its own state: a separate writer does it, and the only thing the main agent may write is notes.md, which the writer drains at each checkpoint. Underneath the structured files sits the raw SQLite trace, the fallback when a detail was dropped rather than compressed.
Everything else in this figure follows from one split: the writer never has to solve the task. The percentages, the eleven fields and the 65K rebuild budget are tuning around that split, not independent ideas. It also fixes the failure mode: the agent debugging a bad test cannot quietly downgrade the record of what it was asked to do.
Evolution: two clocks, two outputs
Dream runs every 7 days over the sessions and the existing memory file: merge, deduplicate, check that referenced paths still exist, keep what is current. Distill runs every 30 days over the same history but looks for process instead of knowledge, and writes what it finds into skills, CLI commands, custom agents and SOP documents.
The two outputs are not interchangeable. Dream shrinks what the agent has to read at the start of a session, so it buys back context. Distill removes a step the agent would otherwise reason through, so it saves tokens on a repeated task. Only the second one compounds without needing a bigger window.
The price is five extra model roles outside the task: judge, verifier, writer, dream, distill. The article reports no ablation that isolates any of them, and its offline benchmarks measure one issue at a time, so nothing in the published numbers measures the mechanisms that only fire past 200 steps. Whether five roles stay separate, or collapse into one runtime-owned maintenance process, is the part still open.