Repository navigation
Description
What happened
On Windows every memory write is refused and the statusline crashes on every render, because several tools assume POSIX paths and permission bits
Summary
Environment
- LifeOS 8.761.0, Windows 11, Bun 1.4.4 (Windows x64)
- Claude Code 2.1.303, hooks run through Git Bash
- The user-data folder is a directory junction from the install tree into the config tree
Summary
On Windows, every memory write is refused and the statusline crashes on every render. Both come from code that assumes / separators, a / filesystem root, or POSIX permission bits. Seven defects, each hidden behind the previous one.
Memory (health check reports "Latest reviewer run is failed")
-
TOOLS/lib/Boundary.ts,confinedPath: an absolute walk starts atsep, so the first component it stats is a backslash followed by the drive letter, which never exists (ENOENT). Every absolute path is refused, including the real file inside the user-data repo. Relative paths pass. Error:EWRITE_FAILED: memory write refused at the system/user boundary ... does not resolve inside the USER_DATA repo. Fix: start fromparse(p).rootand join withcur.endsWith(sep). -
TOOLS/lib/Boundary.ts,atomicWrite:invariant((fstatSync(fd).mode & 0o777) === mode)always fails, because Windows reports 0o666 whatever mode was requested. -
TOOLS/MemoryWriter.ts,snapshotBeforeWrite:absPath.split("/").pop()returns the whole Windows path, which trips the invariantsnapshot target ... must sit directly in ... memory-snapshots. -
TOOLS/MemoryWriter.ts: the invariantsnapshot dir ... is wider than 0700fails for the same reason as (2). -
TOOLS/MemoryWriter.ts(4 sites):abs.replace(CLAUDE_ROOT + "/", "")leaves the full drive-letter path as the ledger row'sfilekey.CortexLedger.ts verifythen reportsentries-drifton files the writer itself just wrote.
Statusline (prints nothing)
-
STATUSLINE/Admission.ts(3 sites):startsWith(this.directory + "/render-")throwsINVARIANT VIOLATION: render lock must be scoped to inflight. Fix: usesep. -
STATUSLINE/State.ts,expandRoot: converts a drive-letter install root to the MSYS form (slash, drive letter, slash). Bun on Windows cannot open that form, so every read understate.rootreturns null. Visible effect: blank STATE row and no doctor line. Fix: keep the native path whenprocess.platform === "win32".
Smaller items found on the way
TOOLS/MergeSettings.tswith a relative--output settings.jsonfails withEEXIST: file already exists, mkdir '.'. An absolute output path works.TOOLS/Inference.tsline 483:spawnSync("id", ["-un"]).stdout.trim()throws when the USER variable is unset andidis not on PATH (PowerShell).TOOLS/ParkedReplay.tsreplays onlyEDRIFTitems, so writes parked withEWRITE_FAILEDare never replayed after the cause is fixed.- The header's flag emoji draws as two letters, because Windows fonts have no flag glyphs.
Repro
- Fresh install on Windows 11; let one session end so the memory reviewer fires.
- Run
bun LIFEOS/TOOLS/MemoryHealthCheck.ts: overall is critical. - Pipe any session JSON into
LIFEOS/LIFEOS_StatusLine.sh: invariant violation.
Verification of the fixes
confinedPath: 12 accept and refuse cases pass, including..escapes through the junction and targets in the system tree.- After all seven: the health check has 0 critical findings,
CortexLedger.ts verifyis OK, a reviewer run wrote entries unaided, and the statusline renders every row.
The patches are small, about 25 changed lines in four files. Happy to open a PR.
Details
- Kind: bug
- LifeOS version: 8.761.0
Filed with the LifeOS /feedback command. The reporter approved this exact text before it was sent; paths, secrets and personal details were stripped locally.
Activity
fix(boundary): resolve root prefix and permission checks on Windows (d…
katieskoehler-star commentedon Nov 16, 2026
Confirming this on a second machine: LifeOS 8.761.0, Windows 11 Home, Bun 1.4.4, hooks run through the Claude desktop app (Code tab), user data linked through a directory junction. Defects 1–5 reproduced exactly as described, and the fixes in this issue cleared them. Three more findings from the same install that this issue doesn't cover yet:
8. The reviewer needs the
claudeCLI on PATH, which a desktop-app-only install doesn't have. Before any of 1–5 bite, the reviewer fails withinference failed: Executable not found in $PATH: "claude", and the health check reports it asparse-failed. The desktop app ships its ownclaude.exe, but in a versioned folder that changes on every app update, so it can't be relied on. Installing the standalone CLI (irm https://claude.ai/install.ps1 | iex) didn't put%USERPROFILE%\.local\binon the user PATH here, so the reviewer kept failing until it was added by hand, and then the CLI also needed its ownclaude auth login. Suggestion: have Doctor (or DetectInference) check thatclauderesolves and is signed in, and name both fixes.9. Ledger rows written before fix 5 need a migration. Rows that were already written with a drive-letter
filekey stay unmatched after the fix.CortexLedger.ts adoptsays "matches the ledger, nothing to adopt" (becauseinspectDriftfinds no head for the relative key and returns null),verifykeeps reportingno-events, andgenesisrefuses because events exist. What worked: move the oldcortex-events.jsonltoarchive/, then rungenesis. A one-time rekey step inMigrate.ts(convert anyfilekey that is absolute or uses\to the POSIX path relative to the root) would avoid the manual step.10.
MemoryHealthCheckreportssettings-hook-absentfor hooks that are registered. On Windows the installed commands look like"C:/.../bun.exe" "C:/.../hooks/MemoryReviewFire.hook.ts"(quoted, absolute, forward slashes). The check flagsMemoryTurnStart,MemoryReviewFireandMemoryHealthGateas "not registered in any settings layer" even though they're registered and firing. It looks like the matcher doesn't accept the quoted absolute form.The same POSIX mode-bit pattern as 2 and 4 also appears in
TOOLS/Secrets.ts(.env must be mode 0600 after set),TOOLS/lib/CacheDir.tsandTOOLS/SplitAndTranscribe.ts, soSecrets.ts setwill likely hit it on Windows as well. Guarding them withprocess.platform !== "win32"worked here.