Skip to content

MiMo Code

MiMo Code is based on OpenCode, but it stores its history in its own SQLite database with a different layout. Hansard imports it as a separate source.

Source Use it for
mimo-code MiMo Code sessions from mimocode.db in MiMo Code’s data folder.

Hansard finds mimocode.db in MiMo Code’s data folder, which is $XDG_DATA_HOME/mimocode (normally ~/.local/share/mimocode) by default. An absolute MIMOCODE_HOME moves it to <MIMOCODE_HOME>/data; a relative value is ignored. MIMOCODE_DB can name an absolute path or a file name inside the data folder, and :memory: is ignored. To point Hansard somewhere else, set HANSARD_MIMO_CODE_DATA_DIR or HANSARD_MIMO_CODE_DB.

Before reading anything, Hansard takes a consistent copy of the database, including changes that are still in its write-ahead log. It then makes a history-only copy that leaves out account, credential, and share-secret tables. Hansard checks the session, message, and part tables and makes sure every record is accounted for. It then converts text, reasoning, tool calls and results, attachments, model and usage details, and agent links. The archive keeps the history-only copy, never your live database. Snapshot replay retains the same native conversation, parent, and nested actor identities as live import.

MiMo Code’s database differs from OpenCode’s: it adds context and checkpoint columns and agent IDs, has no full-message table, and stores todos differently. Hansard does not import MiMo Code’s older JSON migration files as a second history. If the database contains unknown, mixed, damaged, or incomplete records, Hansard stops the import instead of importing part of the history.

Terminal window
hansard import --source mimo-code --since all
hansard index rebuild
  1. When the import finishes, open Sessions and selectFilter & sort.
  2. Set Source to MiMo Code and setTime to the window you imported. UseFolder to narrow the list when you use this harness in several projects.
  3. Select a conversation to check its messages, tool calls, files, commits, model, and token usage.

To keep archiving new sessions from a local harness, openSettings → Imports. Automaticfollows every supported harness installed on this computer.Custom lets you turn individual harnesses on or off. Cloud sources turn on separately under Cloud agents, and ChatGPT, Claude.ai, Gemini, and Gemini Notebook / NotebookLM exports import withImport export…. Each also has its own import command. If a conversation you expect is missing after you reset the filters, run the import command on this page again with --explain-skips where the source supports it.

  • Sessions, messages, parts, tool calls and results, attachments, model and usage details, workspace details, current todos in order, and linked agent sessions.
  • Session titles with where each title came from, prompt configuration, each agent’s result message, and the system and tool prompt prefixes that MiMo Code 0.1.15 records.
  • The history-only copy of the database used for the import, including changes that were still in its write-ahead log. Account, credential, and share-secret tables are left out.
  • After rebuilding a SQLite snapshot from raw, ordinary live imports cannot overwrite that snapshot. Returning to live imports currently requires a full archive refresh. Preview hansard update --dry-run before choosing its scope.
  • MiMo Code shares OpenCode’s origins, but Hansard never reads its database as an OpenCode database.
  • Pricing for a specific model route needs the exact route recorded in MiMo Code’s database.
  • Unknown or damaged records stop the import instead of being silently left out.
Terminal window
hansard import --source mimo-code --since all
hansard index rebuild

After an update, the watcher refreshes most archived conversations on its own, but it leaves MiMo Code’s SQLite snapshots as they are. The import above reads them again from MiMo Code’s database. If that database is gone, rebuild the snapshots from Hansard’s preserved copy:

Terminal window
hansard rebuild --from-raw --source-type mimo-code-history --since all