MiMo Code
MiMo Code is an OpenCode fork, but its stable history database is a distinct SQLite cohort. Hansard gives it an independent source identity, schema inspector, converter, data-root resolver, and provider.
Source IDs
Section titled “Source IDs”| Source | Use it for |
|---|---|
mimo-code |
MiMo Code local sessions from the mimocode data root. |
How the import works
Section titled “How the import works”Hansard discovers mimocode.db below the effective MiMo data root. By default
that is $XDG_DATA_HOME/mimocode (normally
~/.local/share/mimocode). An absolute MIMOCODE_HOME changes it to
<MIMOCODE_HOME>/data; relative values are invalid and are not scanned.
MIMOCODE_DB may be an absolute path or a name relative to the effective data
root; :memory: is ignored. Explicit Hansard data-root and database overrides
are also supported.
Before inspecting records, Hansard creates one coherent private SQLite capture containing committed main-database and WAL state, then derives a fresh history-only projection that excludes account, credential, and share-secret tables. A MiMo-specific inspector validates the session/message/part schema and exact physical record accounting, then the registered MiMo converter normalizes text, reasoning, tools and results, validated attachments, recorded model and usage fields, and agent relationships. The filtered history projection is archived once with a privacy descriptor and reused for offline replay; the live database is never reopened or resnapshotted during archive handoff.
The MiMo schema is not OpenCode’s schema: it adds context/checkpoint session
columns and message agent ids, has no full-message session_message table, and
uses a different todo shape. Only the validated low-level legacy message/part
normalizer is shared. MiMo’s upstream JSON migration reader is not treated as a
second stable history source. Unknown, mixed, malformed, or incompletely
accounted records fail closed before publication.
Import and keep current
Section titled “Import and keep current”hansard import --source mimo-code --since allhansard index rebuildhansard config sources add mimo-codehansard watcher restartReview the import in the app
Section titled “Review the import in the app”After the import finishes, open Conversations and selectFilter & sort. Set Source toMiMo Code, choose the backfill window underTime, and use Folder when the same harness appears in several projects. Select a result to inspect its messages, tool calls and results, files, commits, model and usage fields, and source provenance in one conversation view.
For a local source that should stay current, open Settings → Indexing & Imports. Automatic follows detected local harnesses; Custom lets Sources scannedselect an explicit set. Explicit cloud and account-export sources do not turn into background network jobs here. If the expected result is absent after resetting the conversation filters, return to the terminal import in this guide and add --explain-skips where supported.
What Hansard preserves
Section titled “What Hansard preserves”- Sessions, messages, parts, tools and results, validated attachments, recorded model and usage fields, workspace metadata, ordered current todos with the provider’s no-priority shape, and linked agent runs.
- The coherent, privacy-filtered SQLite history object used for detection and conversion, including committed WAL state, with provenance for offline raw replay.
- MiMo provider, source, schema-cohort, and physical-store identity.
Known limitations
Section titled “Known limitations”- OpenCode ancestry does not make the MiMo schema an OpenCode cohort.
- Route-specific model pricing requires the exact provider route recorded in the MiMo store.
- Unknown or malformed records fail the source rather than being left unmapped.
Refresh an existing archive
Section titled “Refresh an existing archive”hansard import --source mimo-code --since allhansard index rebuild