MiMo Code: A Terminal AI Assistant That Remembers Across Sessions
MiMo Code: Where Models and Agents Co-Evolve. MiMoCode also supports connecting to any mainstream LLM provider API.
At a glance
- What is it?
- MiMo Code is a terminal-native AI coding assistant from Xiaomi that pairs multiple agents with a SQLite-backed persistent memory system. It supports any OpenAI-compatible provider, but its real value is in long-horizon work where context survives restarts.
- Who is it for?
- Adopt MiMo Code if you work in a terminal, need cross-session project memory, and want to switch between build, plan, and compose modes without leaving your editor. Skip it if you rely on macOS Terminal.app, which is unsupported, or if you need a GUI-first experience.
- Can I use it commercially?
- Yes. MIT is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
- Is it still maintained?
- Yes. The repository last received commits 1 day ago.
- What is it written in?
- Mainly TypeScript, according to GitHub's language statistics.
Answers come from the project's GitHub data, last synced on September 14, 2026, and from our analysis. They are not legal advice.
DEEP OPEN-SOURCE ANALYSIS
What MiMo Code Actually Solves
MiMo Code targets a specific pain: coding assistants that forget everything when you close the terminal. The README positions it as a terminal-native AI coding assistant with persistent memory, so the problem it solves is not just code generation but continuity. For engineers who juggle long-lived branches, complex refactors, or multi-day debugging sessions, the cost of re-explaining project context to an agent is real. MiMo Code tries to eliminate that by storing project knowledge, session checkpoints, and task progress in files that survive restarts. The intended user is a developer who already lives in a terminal and wants an agent that behaves more like a teammate with a memory than a stateless chat. It is not aimed at GUI-centric users or those who want a lightweight autocomplete plugin.
The Co-Evolution Claim and What It Means in Practice
The tagline 'Where Models and Agents Co-Evolve' is vague, but the repository layout gives it a concrete interpretation. MiMo Code bundles multiple agents: build, plan, and compose. The build agent has full tool permissions for development, plan is read-only for analysis, and compose is an orchestration mode for specs-driven workflows. The co-evolution part appears in the memory system: the agent writes to MEMORY.md, checkpoint.md, notes.md, and task progress files, then reads them back on the next session. That is a feedback loop where the agent's own outputs become future inputs. The README also mentions that frontier models can use the build agent with a `/compose-next` skill, which suggests the agent definitions co-evolve with model capabilities. This is not a marketing slogan you can verify from the repo alone, but the mechanism is visible in the file structure.
How the Persistent Memory Mechanism Works
The memory system is the most concrete part of the architecture. It uses SQLite FTS5 full-text search to power cross-session memory. Four file types matter: MEMORY.md for persistent project knowledge, checkpoint.md for structured session snapshots, notes.md for temporary notes, and tasks/<id>/progress.md for per-task logs. The documentation states that memory is injected automatically when a session resumes, so the agent does not need to relearn project context. The intelligent context management layer decides when to save checkpoints based on the model context window, and when context approaches the limit it reconstructs context from the latest checkpoint, project memory, task progress, and recent messages. Budgeted injection uses a token budget with importance ranking to control how much of that content enters context. This is a real mechanism, not a promise. The trade-off is that it depends on the agent actually writing useful checkpoints, which is a behavior you would need to observe in practice.
Getting It Running: Install, Config, and First Launch
Installation is straightforward. On macOS and Linux, the one-line installer is `curl -fsSL https://mimo.xiaomi.com/install | bash`. On Windows PowerShell, it is `powershell -ep Bypass -c "irm https://mimo.xiaomi.com/install.ps1 | iex"`. There is also an npm route: `npm install -g @mimo-ai/cli`, then run `mimo`. The first launch guides you through configuration. You can choose Xiaomi MiMo Platform via OAuth, Codex via OpenAI OAuth, import from Claude Code to migrate existing authentication, pick a catalog provider by API key, or add a custom provider that is OpenAI-compatible. The README gives a concrete config example for compaction: the `compaction.max_context` key in a JSONC config file lets you set per-model limits like `"openai/gpt-5.6": "272K"` or use wildcards like `"anthropic/*": "300K"`. The value is clamped to what the provider accepts, so it can only lower the compaction point, never raise it. That is a useful detail for cost control, since the README notes that OpenAI prices GPT-5.6 prompts above 272K input at 2x input and 1.5x output for the whole request.
Known Limitations and Failure Modes
The README is honest about several failure modes. macOS Terminal.app is explicitly unsupported; the interface may misalign, flicker, or render incorrectly, and you must use iTerm2 or the VS Code integrated terminal. On Windows with a non-UTF-8 locale like zh-CN, CJK output can appear garbled, and the workaround is to enable the system-wide UTF-8 beta toggle, which can break other non-Unicode programs. Over SSH, the TUI can lag, and the recommended fix is to run the server on the remote host with `mimo serve --port 4096`, create an SSH port forward, and attach locally with `mimo attach http://127.0.0.1:4096`. These are not edge cases; they are common environments for terminal tools. The compose agent is also isolated once entered, meaning you cannot switch back to build or plan after the first message, which is a deliberate design choice to keep tool sets fixed but could be frustrating if you enter compose by mistake.
The Compaction Trade-Off: Cost vs. Context
The `/context-limit` command and the `compaction.max_context` config expose a real trade-off. You can force a model to compact earlier than its own context window, which reduces cost but also reduces the working context available to the agent. The README gives a concrete example: OpenAI prices GPT-5.6 prompts above 272K input at 2x input and 1.5x output for the whole request, so setting a lower limit avoids that cost tier. But the same model can have a different usable window depending on how you reach it, such as a ChatGPT/Codex subscription versus a direct API. The config supports per-model values and wildcards, so you can set `"openai/gpt-5.6": "272K"` or `"anthropic/*": "300K"`. The value is clamped to what the provider accepts, so it can only lower the compaction point, never raise it. This is a useful knob, but it requires you to know your provider's pricing tiers and actual window limits, which the README itself warns may differ by access method.
Alternatives and How MiMo Code Differs
The most obvious alternative is Claude Code, and the README acknowledges it by offering an import path: you can migrate existing Claude Code authentication in one step. That is a direct comparison. Claude Code also runs in the terminal and uses a similar agentic model, but MiMo Code differentiates itself with the persistent memory layer and the explicit multi-agent modes. Another alternative is a generic OpenAI-compatible CLI like `aichat` or `shell-gpt`, but those are stateless and do not have the checkpoint or task progress system. The key difference is the SQLite FTS5 memory backend and the automatic context reconstruction, which are not present in simple API wrappers. The README also mentions that MiMo models work in other tools like Cursor, Cline, and Zed via the awesome-mimo-agent collection, so you are not locked into MiMo Code if you prefer a GUI. That is a pragmatic stance, but it also means MiMo Code's memory system is its main reason to choose it over those tools.
Maintenance, License, and Upgrade Cost
The repository is under the MIT license, which is permissive and imposes no copyleft obligations, so you can adopt it without legal friction in most commercial settings, though you should verify the license terms yourself. The project is not archived, and the recent releases show a steady cadence: v0.1.13 on 2026-08-19, v0.1.12 on 2026-08-13, and v0.1.11 on 2026-08-10, which is roughly weekly updates. That suggests active maintenance, but it also means you should expect frequent changes and potential breaking changes in the TUI or config format. The README does not document an upgrade path beyond the npm install command, so upgrading likely means reinstalling or pulling the latest version. The memory files are plain Markdown and SQLite, so they are portable across versions, but the checkpoint format could change. The maintenance cost is moderate: you need to keep the CLI updated, monitor for changes in the `compaction.max_context` schema, and test after each upgrade because the agent behavior can shift with model updates. The system-wide UTF-8 toggle on Windows is a heavier long-term cost, as it affects all programs, not just MiMo Code.
Editorial conclusion
Adopt MiMo Code if you work in a terminal, need cross-session project memory, and want to switch between build, plan, and compose modes without leaving your editor. Skip it if you rely on macOS Terminal.app, which is unsupported, or if you need a GUI-first experience. Before adopting, verify that your LLM provider's context window matches the compaction settings you plan to set, and test the TUI over SSH with the local-render remote-server pattern to avoid lag. Check the MIT license and the project's active release cadence, then run `mimo` in a scratch project to confirm the first-launch configuration flow meets your authentication needs.
Community notes