DocsQuick StartAI News
AI NewsXiaomi Open Source MiMo Code: Outsourcing Memory to Subagents — Terminal AI Programming Assistant
Product Update

Xiaomi Open Source MiMo Code: Outsourcing Memory to Subagents — Terminal AI Programming Assistant

2026-06-10T22:04:06.312Z
Xiaomi Open Source MiMo Code: Outsourcing Memory to Subagents — Terminal AI Programming Assistant

Xiaomi today open-sourced MiMo Code V0.1.0, based on secondary development of OpenCode, under the MIT license. The biggest highlight is using an independent subagent to take over memory management, solving the problem of forgetting during long sessions, and it comes with a limited-time free built-in MiMo-V2.5 multimodal model.

Xiaomi Open Source MiMo Code: Terminal AI Programming Assistant that Outsources Memory to Subagents

Last night at midnight, Xiaomi’s MiMo team dropped MiMo Code V0.1.0 — a terminal-based AI programming assistant, developed on top of OpenCode and directly open-sourced under the MIT license to GitHub. At a time when Claude Code, Cursor, Cline, and Aider have already crowded this track, Xiaomi has chosen to position itself as an “exploratory” tool, with ambitions that are actually quite bold: instead of simply re-skinning and redistributing OpenCode, they aim to break new ground in long-session memory mechanisms.

This marks the first official move this year for the Xiaomi MiMo series to extend model capabilities into the Harness layer, following the consecutive open-sourcing of the V2 Flash coding model and the V2.5 full-modal series. Just a few days ago, Lei Jun boasted on Weibo about the V2.5-Pro-UltraSpeed achieving over 1000 tokens/s on a trillion-parameter model, and now the supporting tools have arrived — the pace is tight.

Screenshot of MiMo Code terminal interface, showing multi-step coding workflow in Compose mode

What it really is: an “Xiaomi-flavored” fork of OpenCode

Let’s clarify its positioning. MiMo Code isn’t reinventing the wheel from scratch — it forked the open-source CLI programming assistant OpenCode and carried out secondary development. OpenCode itself enjoys a good reputation among overseas developer circles, featuring multi-provider support, pluggable modules, and a TUI interface; it occupies the same niche as Claude Code in the open-source world.

On this foundation, Xiaomi has done several things:

  • Integrated its own MiMo-V2.5 multimodal model as a time-limited free default channel (officially called MiMo Auto, zero-config startup)
  • Compatible with major domestic model APIs such as DeepSeek, Kimi, GLM, as well as third-party Token Plans
  • Rewritten the memory system, creating a proprietary three-layer persistence mechanism
  • Added distinctive features: Compose mode, /dream command, and voice input
  • Customized the Harness system for MiMo series models, enabling model-framework collaborative optimization

Installation follows the standard CLI pattern:

# Mac / Linux
curl -fsSL https://mimo.xiaomi.com/install | bash

# Windows
npm install -g @mimo-ai/cli

Once installed, start it by typing mimo in the terminal. If you’ve used OpenCode or Claude Code before, migration cost is virtually zero.

The real highlight: outsourcing memory to a subagent

The most noteworthy aspect of MiMo Code is how it handles the problem of forgetting in long sessions. This has always been a pain point for Agent-type programming tools — once the context window is full, you either forcibly truncate and lose key information, cram too many tokens and blow up cost and latency, or rely on RAG retrieval with fluctuating recall quality.

Xiaomi’s solution in a nutshell: The main agent focuses solely on work, and recording is fully outsourced.

The specific mechanism consists of three parts:

  1. Project Memory: Long-term project-level understanding, including code structure, conventions, and dependencies
  2. Session Checkpoints: Periodic snapshots, solidifying states at key decision points
  3. Task Progress: Tracking position within the current task chain

None of these layers are maintained by the main agent itself — instead, they’re handed off to a dedicated subagent running in the background. When the window is nearly full, the subagent automatically produces a compressed “clean brief,” which the main agent uses to continue without having to rebuild the context from scratch.

This design is actually quite clever. The traditional approach has the model summarize its own preceding context and reinsert it into the prompt, but when a model is simultaneously working and compressing its memory, its attention is divided and compression quality is inconsistent. Xiaomi’s method essentially lets a dedicated “secretary” take notes throughout the process, with the main agent completely unaware. The tradeoff is additional token consumption for the subagent, but in long-project scenarios, the output quality gains should be significant.

The /dream command: letting the assistant “sleep on it”

More interesting is the /dream command, triggered automatically every 7 days.

What this Agent does is analogous to memory consolidation during human sleep — it reads the past week’s session history and existing memory files, then performs four tasks: merging repeated information, removing redundant entries, verifying file path validity (to avoid memories pointing to deleted files), and compressing to a more compact current state, then writing back to global memory.

Why does this matter? Because simply piling up memory leads to “rot” — a utils.ts file that existed yesterday may have been refactored away today; a function signature noted last week may already have changed. Without regular cleanup, the larger the memory base, the dirtier it becomes, potentially contaminating the main agent’s judgment.

Making this “memory maintenance” a scheduled asynchronous task instead of running heavy I/O on every startup is quite an engineering-focused choice. Claude Code and Cursor currently lack similar mechanisms, relying instead on users manually maintaining static files like CLAUDE.md or .cursorrules.

Compose mode: from a single sentence to industrial-grade delivery

Switching to Compose mode via the Tab key changes the tool’s behavior — no longer a simple Q&A interaction, it now bundles the entire pipeline of “design–planning–coding–testing–review” into one run.

Xiaomi’s official line is “1+1>2 synergy.” How to understand this? Most likely in Compose mode, the main agent invokes multiple specialized subagents to handle design, code generation, unit testing, code review, etc., akin to multi-agent orchestration in Devin or OpenHands, but running locally in the terminal.

This path is actually the mainstream direction for current AI programming tools — the ceiling for single-agent capability is already apparent. Multi-agent collaboration + task decomposition is the key to moving from “completion” to “delivery.” Whether Xiaomi can achieve substantial differentiation depends on how deeply the Harness system and MiMo-V2.5 cooperate. Since both model and Harness are in-house, they theoretically have more tuning space than generic tools, but whether that translates into tangible user experience will be revealed in future iterations.

Voice input: talking to your terminal

MiMo Code also includes a feature that might seem a bit like a “show-off” but could actually be practical — voice input and control, built on MiMo-V2.5-ASR.

The scenario is roughly like this: When you mistype a command, instead of deleting a long string, simply say “change the filename to user_service”; to execute an action, just say “send,” “run,” or “cancel.” This allows hands-free keyboard operation for both input and control.

This feature might be awkward in open offices or pair programming situations, but during solo deep development sessions, paired with a wireless headset, it can save quite a bit of finger work. It’s a differentiating selling point, though not core competitiveness.

Horizontal comparison: finding a niche between Claude Code and OpenCode

Placing MiMo Code in the current CLI programming assistant landscape:

  • vs Claude Code: Anthropic’s Claude Code is closed-source, strongly model-driven, and Harness black-box; MiMo Code is open-source, model-switchable, and Harness transparent/modifiable. Ecosystem maturity differs greatly, but MiMo Code is more flexible.
  • vs OpenCode: Essentially a fork. MiMo Code mainly adds the memory system, Compose mode, voice input, and custom Harness, with friendlier integration for domestic users’ model APIs (GLM, Kimi, DeepSeek are natively supported).
  • vs Aider/Cline: Aider leans toward Git workflow; Cline leans toward IDE integration (VS Code extension); MiMo Code is pure terminal-native, positioned closer to Claude Code in form.

For domestic developers, MiMo Code’s biggest attractions are twofold: first, the time-limited free MiMo-V2.5 channel, allowing zero-cost adoption; second, native compatibility with major domestic model APIs, without fiddling with proxies. Open source + MIT license also means enterprises can safely fork and deploy internally.

Incidentally, OpenAI Hub already supports the MiMo-V2.5 series models; developers wishing to use the same Key to simultaneously call GPT, Claude, Gemini, and DeepSeek for A/B testing within MiMo Code can simply point the base_url accordingly, skipping multiple registrations.

A few points worth watching

This version number is V0.1.0, and the “exploratory” label is clearly stated — Xiaomi hasn’t released it as a production-grade tool. A few issues to observe:

  • Actual token consumption and latency of the subagent memory system, especially when /dream triggers
  • Quality of “industrial-grade deliverables” generated in Compose mode compared to Claude 4.x + Claude Code
  • Pricing strategy after the free channel ends — according to other reports, MiMo’s programming package currently has three tiers at ¥29/¥49/¥119, corresponding to different prompt quotas
  • Synchronization strategy with upstream OpenCode — periodic rebase or gradual divergence

For domestic developers, the cost of trying MiMo Code right now is basically zero — open source, free model channel, no need for VPN. Even if one doesn’t stick with it, it’s worth experiencing the feel of “outsourcing memory to a subagent” in real coding scenarios. This may be the most notable aspect of MiMo Code’s release: it’s not just another Claude Code alternative, but offers an engineering-savvy answer to the long-session memory problem.

Repository address is on GitHub at XiaomiMiMo/MiMo-Code; those interested can clone it to examine Harness implementation.

References

Related Articles

View All

Contact Us

We usually reply quickly during business hours

Scan WeChat

Support: Hub Assistant

WeChat ID: