Xiaomi MiMo Code Goes Open Source: How Cross-Session Memory Is Changing AI Programming Collaboration

Xiaomi open-sources MiMo Code, a terminal AI coding Agent with cross-session memory and multi-Agent collaboration.
Xiaomi's MiMo team built MiMo Code in 14 days — an open-source terminal programming Agent that differentiates itself through cross-session memory and multi-Agent collaboration. Offering Build, Plan, and Compose modes, it features a multi-layered memory system using SQLite, TDD-integrated workflows, and a self-evolution mechanism that distills session patterns into reusable skills. While still at V0.1.0, it signals a shift in AI coding tools from one-shot generation to long-term project collaboration.
Xiaomi's MiMo team built a uniquely positioned terminal-based programming Agent in just 14 days with a team of 5 — MiMo Code. It's not just another open-source alternative to Claude Code. Instead, it puts "cross-session memory" and "long-term project collaboration" at its core, aiming to solve the biggest pain point of current AI programming tools: forgetting everything after each session.
More Than a Code Generator in Your Terminal
At first glance, MiMo Code does look a lot like Xiaomi's version of Claude Code: it runs in the terminal, can read and write code, execute commands, manage Git, and dispatch sub-Agents for complex tasks. But its real differentiation lies in building on top of the Open Code branch with added memory systems, context management, multi-Agent collaboration, and automated workflows.
Open Code is an open-source terminal AI programming framework — essentially an open-source recreation of Claude Code's interaction paradigm. Claude Code, developed by Anthropic, is an AI programming assistant that runs in the command-line terminal, allowing developers to interact via natural language for code writing, debugging, and project management. This terminal-native interaction approach has distinct advantages over IDE plugins (like GitHub Copilot or Cursor): it aligns more closely with experienced developers' workflows, can directly manipulate the file system and execute Shell commands, and doesn't depend on any specific editor. By forking from Open Code, MiMo Code inherits a mature terminal interaction layer, allowing the team to focus their efforts on differentiated capabilities like the memory system and multi-Agent collaboration.

Installation is straightforward — the team provides a one-click script or NPM global install. On first launch, you can choose the limited-time free MiMo Auto anonymous channel, log in to Xiaomi's MiMo platform, import existing credentials from Claude Code, or connect a custom model service compatible with the OpenAI API. This means MiMo Code doesn't lock itself into a single model ecosystem.
Three Main Agent Modes: Build, Plan, Compose
The most noteworthy architectural design in MiMo Code is how it splits the Agent's work into clearly defined capability layers, offering three main Agent modes:
- Build mode: Direct development — quickly generate and modify code
- Plan mode: Read-only analysis — no code changes, only solution proposals
- Compose mode: Full workflow orchestration — from planning to delivery

The main Agent can also create sub-Agents on demand, splitting tasks for parallel processing while tracking their complete lifecycle. Multi-Agent collaboration is a major trend in current AI system architecture. In the traditional single-Agent model, one large language model must simultaneously handle understanding requirements, planning solutions, writing code, and self-checking — easily leading to attention fragmentation and context pollution in complex scenarios. The core idea behind multi-Agent architecture is "divide and conquer" — assigning different responsibilities to specialized Agents, each with its own system prompt, toolset, and context window. The main Agent acts as a coordinator, responsible for task decomposition and result aggregation, while sub-Agents focus on their respective subtasks. This architecture has been widely practiced in frameworks like Microsoft AutoGen, CrewAI, and LangGraph. MiMo Code's innovation lies in combining this multi-Agent pattern with cross-session memory, enabling sub-Agents not only to execute in parallel but also to inherit their previous working state when a session resumes.
Combined with cross-session memory, automatic context reconstruction, and termination condition evaluation, this effectively mitigates the two most common problems in AI programming: "mid-task amnesia" and "premature completion declarations."
Cross-Session Memory: Project Archives, Not Just Longer Context
MiMo Code's most interesting design choice is placing long-task continuity at the product's core. It establishes a multi-layered memory system:
- MEMO files: Store project knowledge and architectural decisions
- Checkpoint: Save session snapshots
- Node: Store temporary notes
- Progress: Track task progress

This content is retrieved via SQLite full-text search and injected back according to context budget when resuming tasks. SQLite is an embedded relational database that requires no standalone server process, storing data as a single local file. Its FTS5 (Full-Text Search 5) extension provides efficient full-text retrieval with BM25 ranking and prefix query support. For a terminal AI tool, choosing SQLite over vector databases (like ChromaDB or Pinecone) reflects clear engineering considerations: zero deployment cost, no external dependencies, offline availability, and for structured project memory (like architectural decisions and task progress), keyword matching is often more precise and controllable than semantic vector retrieval. Of course, this also means MiMo Code's memory retrieval currently may lack semantic fuzzy matching capability — a hybrid retrieval strategy might be introduced in the future.
The design philosophy is clear — rather than simply extending the context window, it builds a project archive system that can relay information across sessions. While current LLM context windows have expanded from the original 4K tokens to 128K or even million-level, simply increasing window length doesn't truly solve the long-term project collaboration problem. Long contexts lead to the "lost in the middle" phenomenon — the model's retrieval accuracy for information in the middle of the context drops significantly. Each new session requires re-injecting the entire context, wasting token quota and increasing latency. More fundamentally, raw conversation logs are filled with trial-and-error processes, abandoned approaches, and redundant discussions — stuffing them directly into context actually interferes with the model's judgment. MiMo Code's memory system is essentially performing structured compression and hierarchical management of information — MEMO stores refined high-value knowledge, Checkpoint stores recoverable state snapshots — far more efficient than simply extending the context window. On each restart, the Agent can quickly reconstruct its understanding of the project rather than starting from scratch.
Compose Mode and the Self-Evolution Mechanism
Compose mode is MiMo Code's most distinctive feature. It organizes planning, execution, code review, TDD debugging, verification, and merging into a fully orchestratable workflow. After a user provides requirements, the Agent doesn't just generate a few code snippets — it progresses step by step through the complete software delivery process.
TDD (Test-Driven Development) is a methodology where test cases are written before implementation code. In the context of AI programming Agents, TDD holds special value: test cases provide the Agent with clear verification criteria, enabling it to autonomously judge whether code is correct rather than relying on the model's "gut feeling." Compose mode embeds TDD into the automated workflow, meaning the Agent automatically runs tests after generating code and fixes code based on failure messages, forming a "red-green-refactor" loop. This approach effectively mitigates the common AI programming problem of "looks right but doesn't actually work." Chaining code review, test verification, and Git merging into an orchestratable pipeline essentially uses mature software engineering practices to constrain and guide AI behavior.
Combined with the Dream and Distill commands, MiMo Code distills session trajectories into project memory and crystallizes recurring manual processes into reusable assets.

The team calls this mechanism "self-evolution," though a more accurate description would be structured sedimentation of usage feedback: high-value information enters project memory, outdated content gets cleaned up, and recurring processes are identified and encapsulated as Skills, Agents, or commands. Encapsulating recurring operational patterns into reusable assets is an important evolutionary direction in the AI Agent field. In academia, this is called "experience learning" or the "skill library" mechanism, first systematically validated in VOYAGER (an AI Agent study based on Minecraft) — the Agent saves successful behavioral sequences as callable skill functions during exploration and directly reuses them in similar scenarios later. In industry, products like Devin and Factory are also exploring similar workflow sedimentation capabilities. MiMo Code's Dream and Distill commands bring this concept to real development scenarios: Dream identifies valuable patterns from session trajectories, and Distill refines them into structured Skills or commands. The long-term value of this mechanism is that a team's tacit knowledge (such as specific project deployment processes or code convention preferences) can be gradually made explicit and automatically executed.
Once this feedback loop is running, the Agent is no longer a one-off code generator — it progressively adapts to the team's own delivery habits.
Current Limitations and Directional Value
It's still too early to treat MiMo Code as a mature replacement for Claude Code. As a V0.1.0 release, the stability of long-running tasks, memory quality, Agent scheduling efficiency, and multi-model experience all need validation in real projects. The duration of the free channel, future pricing, and service strategy will also affect whether it can integrate into developers' daily workflows.
However, MiMo Code points to an important direction: competition among AI programming Agents is shifting from "one-shot code generation" to "long-term project collaboration and workflow sedimentation." Whoever can make an Agent truly understand a project's history, architecture, and team preferences will build a moat in the next phase of competition. Xiaomi shipped the first version in 14 days with 5 people — now the question is whether it can deliver on this vision in real-world development scenarios.
Key Takeaways
Related articles

The Decline of Tokenmaxxing: Why Selling Outcomes Matters More Than Selling Tokens
The Tokenmaxxing craze is fading as enterprise AI procurement shifts from chasing Token counts to focusing on actual business outcomes. Learn why outcome-based AI evaluation is the right approach.

Perplexity Computer Integrates Deep Research as a Native Skill: A New Paradigm for AI Agent Capability Fusion
Perplexity integrates Deep Research as a native skill in Computer, enabling automatic invocation without manual mode switching. Analyzing the Agent Harness design philosophy and AI capability fusion trends.

Key Takeaways from Andrew Ng × OpenAI's Prompt Engineering Course: Two Core Principles Explained
Deep dive into Andrew Ng & OpenAI's ChatGPT Prompt Engineering course: Base LLM vs instruction-tuned models, two core prompting principles, and API-first development thinking for developers.