Xiaomi makes phones and IoT devices, and it also open-sources large language models. MiMo-Code is Xiaomi's official open-source terminal-native AI coding assistant. The repo, XiaomiMiMo/MiMo-Code, had 12,598 stars and 1,286 forks as of July 31, 2026, is written in TypeScript, MIT-licensed, and was created on June 10, 2026. The README opens with one line that sets the tone: "MiMo Code: Where Models and Agents Co-Evolve." It's not an IDE plugin -- it's a coding assistant that runs in your terminal, reads and writes code, runs commands, manages Git, and uses a persistent memory system to maintain a deep understanding of your project across sessions while continuously improving itself. It's built as a fork of OpenCode, keeping all core OpenCode capabilities (multiple providers, TUI, LSP, MCP, plugins), and layers on top persistent memory, intelligent context management, subagent orchestration, goal-driven autonomous loops, compose workflows, and self-improvement via dream/distill.
What Problem It Solves: The Cross-Session Amnesia
Anyone who's used a terminal coding assistant has hit these pitfalls: you spend the morning explaining project background, architecture conventions, and naming rules to the agent, close the terminal, reopen it, and everything resets -- you start over from scratch. Or the session gets long, the context window fills up, and the agent starts forgetting decisions it made earlier. Or you take a different execution path and the agent has no idea where things left off. The root cause is that the agent has no "project memory" -- every session starts as a new hire on day one. MiMo-Code targets exactly this. Its persistent memory system is built on SQLite FTS5 full-text search, injecting project context across sessions so the agent doesn't have to relearn your project every time. It also turns context management into an automatic mechanism: when context approaches the window limit, it rebuilds from the latest checkpoint, project memory, task progress, and retained recent messages, so the agent can continue the current task instead of starting over.
Core Mechanism: Where Models and Agents Co-Evolve
The "Where Models and Agents Co-Evolve" tagline in the README isn't rhetoric -- it lands on two mechanisms.
The first is persistent memory. MiMo-Code splits memory into four layers: project memory (MEMORY.md, holding persistent project knowledge, rules, and architecture decisions), session checkpoint (checkpoint.md, structured state snapshots maintained automatically by the checkpoint-writer subagent), scratch notes (notes.md, a temporary note area), and task progress (tasks/<id>/progress.md, one log per task). When a session resumes, these are injected into context automatically, so the agent doesn't need to relearn the project.
The second is dream/distill self-improvement. The /dream command scans recent session traces, extracts persistent knowledge into project memory, and removes outdated entries. The /distill command discovers repeated manual workflows in recent work and packages high-confidence candidates into reusable skills, subagents, or commands. This creates a closed loop: the more the agent works, the thicker its memory and the more skills it accumulates, making it more efficient at similar tasks next time. That's what "co-evolution" means in practice -- not the model's weights evolving, but the agent's understanding of your project evolving.
There's also intelligent context management. Beyond automatic checkpoints and context reconstruction, it has a budgeted injection mechanism: a token budget controls how much checkpoint, memory, and notes content enters context, ranked by importance. The /context-limit command (or compaction.max_context in config) lets a model compact earlier than its own context window -- the README gives a concrete example: OpenAI prices GPT-5.6 prompts above 272K input at 2x input and 1.5x output for the entire request, so you can set the compaction point below 272K to save money. The README also notes a reality: the advertised window isn't always what you get. The same model can have a different usable window depending on whether you reach it through a ChatGPT subscription, a direct API key, or a reseller like OpenRouter -- a catalog figure of 1M doesn't mean your route actually serves 1M.
Multiple Agents: build / plan / compose
MiMoCode ships three primary agents, switched with the Tab key.
build is the default mode, with full tool permissions for development -- everyday coding, running commands, and managing Git go here. plan is a read-only analysis mode for code exploration and solution design; it can't modify anything, suited for scoping things out before touching code. compose is an orchestration mode for spec-driven development and skill-driven workflows.
One key detail: after the first message, the mode locks. build and plan can still switch between each other, but compose is isolated once entered -- the README says fixing the skill and tool set from session start significantly improves tool-call reliability.
The compose mode has two paths. The recommended path is the /compose-next skill on the build agent: a single self-contained contract covering grill -> spec -> workspace -> implement -> verify -> review -> finalize -> finish, designed for frontier models (the README's words: "Fable/Sol-class"). The legacy path is the dedicated compose agent (switched to via Tab), which orchestrates 14 built-in skills for planning, execution, code review, TDD, debugging, verification, and merging -- a step-by-step curriculum that remains useful for weaker models.
The subagent system is worth highlighting: the primary agent creates subagents on demand, they share the current session context, can work in parallel, and come with lifecycle tracking, cancellation, and background execution. Paired with the /goal command, which sets a stopping condition for a session, an independent judge model evaluates the conversation when the agent tries to stop, deciding whether the condition is truly satisfied -- preventing premature "optimistic stops" during autonomous work.
Installation and Channels: From Zero Config to Claude Code Import
Three installation paths:
# One-line install (macOS / Linux)
curl -fsSL https://mimo.xiaomi.com/install | bash
# Windows PowerShell
powershell -ep Bypass -c "irm https://mimo.xiaomi.com/install.ps1 | iex"
# Or install via npm (all platforms)
npm install -g @mimo-ai/cli
# Run
mimoThe first launch guides you through configuration automatically. Six channels are available: MiMo Auto (free for a limited time, anonymous, zero configuration -- works out of the box), Xiaomi MiMo Platform (OAuth login), Codex (OpenAI OAuth login with ChatGPT Pro/Plus), Import from Claude Code (migrate existing authentication in one step), Provider list (connect catalog providers by API key or OAuth, e.g. xAI/Grok), and Custom Provider (add any OpenAI-compatible API in the TUI).
The "Import from Claude Code" option is a practical design choice: developers already using Claude Code don't need to set up a new API key -- they migrate their existing auth in one step and start running. This lowers the switching barrier; you don't have to redo the API key application process just because you changed tools.
Workflows and Skills: Deterministic Scripts Plus 24 Builtin Skills
Beyond the conversational agents, MiMoCode has a Workflow system: deterministic JavaScript scripts that orchestrate multiple agents in a sandboxed runtime. Unlike agent conversations, workflows encode fixed phase sequences with bounded retries and automatic parallelization -- fire-and-forget execution with no user interaction required. Four are built in:
The compose workflow runs Brainstorm -> Design -> Implement -> Verify -> Review -> Report -> Merge, a full development pipeline that auto-parallelizes independent tasks into isolated git worktrees, applies TDD per task, and chains structured output between phases. Best for well-defined tasks that decompose cleanly.
The deep-research workflow runs Brief -> Plan -> Research -> Reflect -> Write -> Review, a multi-source deep research report generator. It plans independent research angles, runs parallel subagents to collect cited findings, reflects on gaps, writes a single coherent Markdown report, then cold-reviews citations.
The fact-check workflow runs Plan -> Search -> Extract -> Group -> Crosscheck -> Report, adversarial fact verification. It runs parallel web searches, extracts checkable facts, groups duplicates, then cross-checks each with a 3-juror adversarial vote. Best for precise claims of the "Is X true?" variety.
The research-experiment workflow runs Baseline -> Loop -> Audit -> Report, an autonomous optimization loop for a mechanically verifiable metric. It establishes a baseline, iterates through hypothesize -> implement -> evaluate -> keep/revert, audits for metric gaming, and produces a reproducible result log. Requires a fixed-budget evaluation command and an explicit editable-file scope.
Custom workflows: drop a .js file in .mimocode/workflows/ or .claude/workflows/ to define your own, or override a built-in by using the same name.
The 24 builtin skills cover a broad surface: arxiv (search, read, cite, and analyze arXiv papers), claude-code (delegate coding, testing, review, and Git tasks to the Claude Code CLI), codex (run and troubleshoot the Codex CLI in headless automation, CI, containers, and remote environments), compose-next (the recommended spec-to-ship delivery workflow), data-analytics, deep-research, design-blueprint, docx-official / pdf-official / pptx-official / xlsx-official (office file handling), drive-mimo (script another MiMoCode process), frontend-design, html-to-video-pipeline, learn-everything, loop, mimocode-docs, modern-python-toolchain, product-design, research-paper-writing, sales, skill-creator, and super-research.
Two skills deserve special mention. evolve is total self-modification -- it can rewrite any layer of the agent: tools, behavior hooks, knowledge, workflows, even the UI. This is the extreme form of "co-evolution": not just accumulating memory, but the agent modifying its own code. The claude-code and codex skills are exposed only when the corresponding CLI executables are installed. Skills can be overridden: create a skill with the same name in your project (.mimocode/skills/<name>/SKILL.md) or personal directory (~/.claude/skills/), and user skills discovered later in the scan order override builtins with the same name.
There's also voice input: activate with /voice, and it uses TenVAD and MiMo ASR for real-time streaming speech-to-text, segmenting audio by pauses and transcribing incrementally into the input. Available for MiMo logged-in users, requires sox.
Comparison: vs Claude Code / Codex / OpenCode
MiMo-Code is a fork of OpenCode, so the relationship there is the most direct: it keeps all of OpenCode's core capabilities and adds persistent memory, intelligent context management, subagent orchestration, goal-driven loops, compose workflows, and dream/distill self-improvement. You can think of MiMo-Code as "OpenCode + memory + self-improvement + workflow orchestration."
Compared to Claude Code, both are terminal-native coding assistants, but they differ in positioning. Claude Code is bound to Anthropic's models and auth ecosystem; MiMo-Code's provider layer is open -- it can connect to MiMo Auto, Codex/ChatGPT, xAI/Grok, any OpenAI-compatible API, and even import auth from Claude Code. Claude Code's memory relies on CLAUDE.md and the .claude/skills directory, which is file-level; MiMo-Code uses SQLite FTS5 full-text search for structured memory, split into four layers (project memory, checkpoint, notes, task progress), with automatic reconstruction and budgeted injection. Claude Code's advantage is deep integration with Anthropic models and a mature ecosystem; MiMo-Code's advantage is model-agnostic flexibility and a more structured memory system.
Compared to Codex CLI, Codex is bound to the OpenAI ecosystem. MiMo-Code can connect via the Codex channel using ChatGPT Pro/Plus OAuth, but isn't limited to it. Codex's interaction is more linear and conversational; MiMo-Code has the build/plan/compose tri-mode plus deterministic workflows, covering everything from interactive development to unattended full pipelines.
Compared to general-purpose coding agents (like Cursor's agent mode), those live inside the IDE; MiMo-Code is terminal-native. The advantage of terminal-native is direct access to run commands, manage Git, SSH in, and write CI scripts without IDE constraints. The trade-off is no graphical jump-to-definition or diff preview.
The MiMo Ecosystem: Beyond MiMo-Code
MiMo models don't only run inside MiMo-Code. The README notes that Xiaomi MiMo models also work in tools like Cursor, Cline, and Zed. The awesome-mimo-agent repo collects setup guides for using MiMo in those tools, and welcomes community PRs to add your own configurations. In other words, MiMo's positioning isn't "one agent locked to one model" -- both the model layer and the agent layer are open. MiMo-Code can connect to various models, and MiMo models can run in various agents. This decoupling goes in a different direction from Superpowers' cross-11-agent-platform distribution: Superpowers distributes methodology (skills), while MiMo distributes models.
Who It's For, and What to Watch For
Suitable for: developers who work in the terminal daily and want a coding assistant that remembers project context; anyone tired of re-explaining project background to an agent every time they reopen the terminal; teams that need spec-driven development or unattended workflows; and Claude Code users curious about a model-agnostic alternative with persistent memory.
Five caveats. First, MiMo Auto is free for a limited time, not permanently free -- how it'll be priced later hasn't been announced, so don't bet your production environment solely on this channel. Second, it's an OpenCode fork, so while it adds memory and workflows, it may also inherit OpenCode's quirks; if you hit odd TUI behavior, check whether it's a known upstream issue first. Third, the "autonomous work" in compose mode and workflows depends on the quality of your upfront spec -- a sloppy plan means the agent follows it sloppily, garbage in garbage out. Fourth, the evolve skill can rewrite the agent's own code, which is powerful but dangerous; think through the boundaries before using it. Fifth, while the license is MIT, there's also a USE_RESTRICTIONS.md use-restrictions document and MiMo Terms of Service for hosted services; read them carefully before commercial use. The MiMo name, logo, and trademarks are subject to the MiMo Trademark Policy and aren't covered by MIT. The README also notes that on Windows with a non-UTF-8 system locale (e.g. zh-CN with code page 936/GBK), command output containing CJK characters may appear garbled. MiMo-Code forces UTF-8 output for spawned subprocesses, but for cases that doesn't cover, enable the system-wide UTF-8 Beta support and reboot.
MiMo-Code isn't complicated -- what's complicated is what it's trying to do: make the agent not a temp worker starting from zero every time, but a "veteran employee" who gets more familiar with your project over time. Persistent memory lets it remember your project, dream/distill lets it distill experience, evolve lets it modify its own code, and workflows let it run full pipelines unattended. Behind those 12,600 stars is Xiaomi's attempt to enter the terminal coding assistant space with the thesis that "models and agents co-evolve." Whether it's a Claude Code replacement depends on how much you need cross-session memory and model freedom.
References
- MiMo-Code GitHub repo (12,598 stars / 1,286 forks, TypeScript, MIT license): https://github.com/XiaomiMiMo/MiMo-Code
- README (feature positioning and mechanisms): https://github.com/XiaomiMiMo/MiMo-Code/blob/main/README.md
- Official website: https://mimo.xiaomi.com/coder
- Blog (mimo-code-long-horizon): https://mimo.xiaomi.com/en/blog/mimo-code-long-horizon
- MiMo ecosystem config guides (awesome-mimo-agent): https://github.com/XiaomiMiMo/awesome-mimo-agent
- Upstream project OpenCode: https://github.com/anomalyco/opencode