#2567·MiMo-Code

Windows: memory index is never populated — POSIX-only path regex skips every file ("path outside memory layout, skipping")

Author: abdoosh100Created Sep 28, 2026Updated Sep 28, 2026

Description

On Windows the memory index is never populated, so the memory tool always returns zero results — it logs one warning per file and moves on.

Error message

WARN service=memory.reconcile
     path=C:\Users\<user>\.local\share\mimocode\memory\sessions\ses_...\notes.md
     path outside memory layout, skipping

Root cause

parsePath in packages/opencode/src/memory/paths.ts matches with a POSIX-only pattern:

typescript
const m = absPath.match(/\/memory\/(global|projects|sessions)(?:\/([^/]+))?\/(.+)\.md$/)

Every path that reaches it is built with path.join(), which emits \ on win32. A real path contains mimocode\memory\sessions\..., so there is no /memory/ substring, the regex never matches, parsePath returns null, and reconcileMemory skips the file:

typescript
const loc = parsePath(p)
if (!loc) {
  log.warn("path outside memory layout, skipping", { path: p })
  continue
}

Net effect: memory_fts stays empty, so memory.search returns [] for every query. parseCcPath has the same defect, which also breaks cc_index.

Evidence

A 0.1.15 Windows session logged 511 identical warnings for 511 memory files — a 1:1 ratio, i.e. nothing was indexed at all. The count tracks the number of files on disk.

Expected behavior

The memory index populates on Windows the same way it does on macOS/Linux, and memory.search returns results. Paths outside the memory layout should still be skipped.

Plugins

No response

MiMoCode version

0.1.15 (Windows 11 x64)

Steps to reproduce

  1. On Windows, create memory under the default layout, e.g. <data>/memory/global/MEMORY.md
  2. Run any memory search
  3. Observe: 0 results, plus one path outside memory layout, skipping warning per file in <data>/log/dev-worker-*.log

A unit test reproduces it directly — the win32 path does not match:

typescript
parsePath(String.raw`C:\Users\me\.local\share\mimocode\memory\global\MEMORY.md`)
// -> null  (expected { scope: "global", scope_id: "", type: "memory", key: "MEMORY" })

Screenshot and/or share link

No response

Operating System

Windows 11 (x64). macOS/Linux are unaffected — path.join already emits / there.

Terminal

Windows Terminal / PowerShell