HTTP/stdio without projectRoot still binds $HOME and can create a decoy ~/memorix.db
Description
Follow-up to #198 (closed). HTTP and stdio clients that omit projectRoot still bind the server cwd. LaunchAgents and Cursor's stdio plugin often start with cwd $HOME. Memorix then:
- Treats
$HOMEas the project (No git project could be resolved from "/Users/…" / "/home/…"). - Can create an empty decoy
$HOME/memorix.db(4096 bytes, 0 observations) while the real store is~/.memorix/data/memorix.db.
Agents then search an empty store and conclude "Memorix has no memories".
Steps to Reproduce
- Start
memorix serveorserve-httpwith cwd$HOME(LaunchAgent default, or Cursor plugin without workspace root). - Call
memorix_search/memorix_project_contextwithoutmemorix_session_start({ projectRoot }). ls -l $HOME/memorix.dband compare to~/.memorix/data/memorix.db.
Expected Behavior
No decoy DB in $HOME. Project-scoped tools fail closed with a bind instruction, or inherit the last git project / MEMORIX_PROJECT_ROOT. Never create ~/memorix.db.
Actual Behavior
Observed on Linux 2026-08-17: empty ~/memorix.db (0 observations) while ~/.memorix/data/memorix.db had 64k rows. Cursor plugin in this workspace answered "Cannot search the current project yet" from /Users/<user> until memorix_session_start({ projectRoot: "…/memorix-workspace" }).
Environment
- Memorix 1.6.0
- Cursor stdio plugin + HTTP
127.0.0.1:3211/mcp - macOS and Linux
Additional Context
Local watchdog now refuses to start from $HOME and reads ~/.memorix/last-project-root. That is a host seatbelt, not an upstream fix. #198's client-projectRoot requirement is still the common failure for Grok / Cursor / OpenCode Autopilot.
Related: #198, #214.
Implementation is in PR https://github.com/AVIDS2/memorix/pull/230 (not #214).
HTTP / stdio / background / CLI refuse $HOME as a project root. Unresolved control-plane launches open the shared store at ~/.memorix/data, never ~/memorix.db. getDatabase() throws if asked to create a DB directly in $HOME. Launch-from-home can inherit MEMORIX_PROJECT_ROOT or ~/.memorix/last-project-root.
Leaving this open until #230 merges.
This is now released in v1.6.3. Project binding and SQLite use one HOME boundary across HTTP, stdio, background mode, and Windows HOME/USERPROFILE resolution. A real Windows launch from an isolated HOME returned healthy and created no ~/memorix.db.