Xiaomi MiMoCode: Open-sourcing the Claude Code Playbook for Free
MiMoCode replicates the Claude Code agent runtime almost feature for feature, ships it MIT and free for now, and pushes the contest from models toward runtimes and entry points.
Summary
Xiaomi’s MiMo team open-sourced MiMoCode, a terminal-native AI coding agent under the MIT license, written in TypeScript and shipped as the npm package @mimo-ai/cli. It reads and writes code, runs commands, manages Git, and its headline feature is persistent cross-session memory, paired with multi-agent orchestration, on-demand subagents, a judge-gated stop condition, and self-improvement routines.
The story is not that there is one more open-source coding CLI. The story is that MiMoCode replicates, almost item for item, the agent harness design that tools like Claude Code already proved out, then distributes it for free under MIT with a time-limited free channel and one-step migration from Claude Code. That signal matters more than the tool: the contest in coding agents is moving from how strong the model is toward who owns the runtime and the entry point.
What happened
MiMoCode installs via a one-line curl or npm install -g @mimo-ai/cli. First launch walks you through configuration with four ways in: a time-limited free MiMo Auto anonymous channel with zero config, OAuth login to the Xiaomi MiMo Platform, one-step import of existing Claude Code authentication, and a custom provider for any OpenAI-compatible API added in the TUI.
The feature list reads like a checklist of harness standard parts:
- Multiple primary agents: build (default, full tool permissions), plan (read-only analysis), and compose (specs-driven and skill-driven orchestration), switched with
Tab. Subagents are created by the system as needed. - Persistent memory backed by SQLite FTS5 full-text search: project memory in
MEMORY.md, a session checkpoint incheckpoint.mdmaintained automatically by a checkpoint-writer subagent, scratch notes innotes.md, and per-task progress undertasks/<id>/progress.md. Memory is injected automatically when a session resumes. - Intelligent context management: it decides when to checkpoint based on the model context window, rebuilds context from the latest checkpoint, project memory, task progress, and retained recent messages when the limit approaches, and uses a token budget with importance ranking to control injection.
- Tree-shaped task tracking (
T1,T1.1, and so on) wired into the checkpoint system so progress survives a session resume. - Subagent system: the primary agent spawns subagents on demand, sharing the current session context, running in parallel, with lifecycle tracking, cancellation, and background execution.
- Goal / stop condition:
/goalsets a stopping condition, and when the agent tries to stop, an independent judge model evaluates the conversation to decide whether the condition is truly met, guarding against premature optimistic stops during autonomous work. - Compose mode: a structured specs-driven workflow with built-in skills for planning, execution, code review, TDD, debugging, verification, and merging.
- Dream & Distill:
/dreamscans recent traces and extracts persistent knowledge into project memory while removing stale entries, and/distillfinds repeated manual workflows and packages high-confidence candidates into reusable skills, subagents, or commands. - Voice input via TenVAD and MiMo ASR, activated with
/voice, available to logged-in MiMo users. - Max Mode: parallel best-of-N reasoning with judge selection, enabled through
experimental.maxModein config.
Configuration lives in .mimocode/mimocode.json per project or ~/.config/mimocode/mimocode.json globally, covering provider and model, agent permissions and custom agents, checkpoint and memory behavior, MCP connections, keybindings, and theme.
One fact you should not skip: the README states plainly that MiMoCode is a fork of OpenCode. It keeps all of OpenCode’s core capabilities (multiple providers, TUI, LSP, MCP, plugins) and adds the persistent memory, context management, subagent orchestration, goal-driven loops, compose workflows, and dream/distill self-improvement on top.
Why it matters
Lay this feature table next to the closed-source coding agents you already know, and they are converging on one shared pattern. Persistent cross-session memory, build/plan/compose role splits, on-demand subagents, an independent judge for the stop condition, full spec-to-ship orchestration, and skill extraction from history. None of these are one vendor’s proprietary invention. They are the near-standard structure that agent harnesses settled into after a year of iteration. MiMoCode’s contribution is that it writes that whole structure out in full and open: the source is MIT, free to read, modify, and self-host, with a separate USE_RESTRICTIONS file attached, and using Xiaomi’s MiMo-hosted services carries additional platform terms.
That carries two implications. First, agent runtime design itself is being commoditized. A year ago, how to checkpoint, how to trim context, and how to stop an agent from lying about completion were each a vendor’s tacit know-how. Now one open repo lays the answers bare. Second, the center of gravity is shifting. When harness design converges and is freely available, differentiation gets squeezed to two ends: the underlying model quality at one end, and distribution plus user retention at the other.
Xiaomi’s move lands squarely on the distribution end. The free, zero-config MiMo Auto channel lowers the barrier to try. The one-step migration from Claude Code pulls a competitor’s installed base straight over. Enhancements such as voice input and Max Mode are gated to logged-in MiMo users, steering people onto the platform. This is not shipping a tool. It is using a tool to capture the developer runtime.
Builder impact
If you are choosing a coding agent, MiMoCode gives you a concrete reference implementation. You can read how it actually lands persistent memory and context reconstruction, and that code is public, which beats reading a marketing post.
If you want to try it, the path is smooth: import your Claude Code auth and run the MiMoCode harness on the model you already use, at near-zero migration cost. That is its smartest design, driving switching cost close to zero. Stay clear-eyed though. The path is a one-way funnel, and the further in you go, the more you bind to the MiMo platform.
If you are building your own agent, treat the README as a requirements list. A tree task plus checkpoint state machine, a token-budgeted injection strategy with importance ranking, and a judge-gated stop condition are the three places autonomous coding agents most often break. MiMoCode offers one worked answer to each, worth comparing against your own.
What to ignore
“Open source means a drop-in Claude Code replacement.” It does not. MiMoCode is a fork of OpenCode, and what is open is the harness, not the model. How well it works for you depends on the backend model you wire in. With harness design converging, model quality is where the gap actually opens, and you supply and pay for the model yourself. The MIT license gives you the code, not a free model on par with Claude.
“The free MiMo Auto stays free.” The README says free for a limited time, in plain text. Planning a workflow around permanent free access is setting a trap for yourself. The free channel exists to acquire users and drive traffic, and once the window closes it most likely either charges or funnels onto the MiMo platform. For long-term use, plan from day one to either bring your own API or pay platform rates.
The length of the feature list is not quality. Multi-agent, voice, Max Mode, dream/distill make for a busy page, but the README gives no benchmarks, accuracy figures, or comparisons. Whether persistent memory recalls accurately, the false-judgment rate of the judge-gated stop, whether context reconstruction drops anything critical, the numbers that decide usability are not published. Judge the tool by what it produces on your real codebase, not by the line count of its feature list.
Technical takeaway
The design most worth copying is the stop condition. The most common failure mode in autonomous coding agents is the optimistic early stop, where the agent declares a task done before it actually is. MiMoCode sets a stop condition with /goal and uses a judge model, independent of the main conversation, to rule on whether the condition is truly met. Taking “decide if it is done” out of the executing agent’s hands and giving it to an independent reviewer is a different reliability class than self-assessment by the executor. That one design is worth a look for anyone building autonomous agents.
FAQ
Should you switch from Claude Code to MiMoCode?
If you want an open-source local coding agent that works with any OpenAI-compatible API and can import your Claude Code auth in one step, it is worth a trial. But it is a fork of OpenCode, model quality depends on the backend you wire in, and the free MiMo Auto channel is time-limited. Treat it as a swappable base, not a free Claude Code replacement.
Which open-source coding agent should you pick?
It depends what you want. For a ready-made set of harness patterns such as persistent memory, multi-agent roles, and a judge-gated stop condition, MiMoCode packages them together. For a leaner base, the OpenCode project it forked is lighter. The real difference is runtime orchestration, not the model, which you supply either way.
Is cross-session memory in a coding agent actually useful?
It helps only when recall and pruning are accurate. MiMoCode uses SQLite FTS5 full-text search plus MEMORY.md, checkpoints, and budgeted injection, which is the right direction. But the real value hinges on recall precision and noise control, and the README publishes no accuracy numbers, so read it as an engineering promise for now.
Why is Xiaomi shipping a free open-source coding agent?
For the entry point and distribution. MIT licensing, one-step migration from Claude Code, and a free-for-now MiMo Auto channel all funnel developers onto MiMo models and the MiMo platform. A coding agent is a hook to capture the developer runtime, not charity.
Sources
No official primary source available; this analysis is based on reliable secondary reporting (named outlets, cross-confirmed).