HTTP control plane binds project to server cwd, not client workspace
Description
In HTTP / control-plane mode, project-scoped tools bind to the server process cwd (often $HOME when started via LaunchAgent / memorix background start), not the client workspace.
Grok, Cursor, and other HTTP clients then get:
Cannot build project context for the current project yet.
No git project could be resolved from "<home>".
This client did not provide a usable workspace root, so project-scoped tools are disabled...
memorix_search (project scope), memorix_project_context, and memorix_codegraph_status fail until someone remembers to call:
memorix_session_start({ projectRoot: "/absolute/path/to/repo" })
Most agent hosts never send projectRoot on the first Autopilot call. Skills tell them to call project_context / search immediately.
Steps to Reproduce
- Start control plane from
$HOME:memorix background start --port 3211 - From a client whose workspace is e.g.
/private/tmpor a git checkout, callmemorix_project_contextor project-scopedmemorix_searchwithoutsession_start({projectRoot}). - Observe bind to
/Users/<home>(no git) and disabled project tools.
Expected Behavior
HTTP clients should be able to declare workspace via MCP roots / initialize params / first request metadata. If unbound, tools should no-op fast with a short hint (they already do) — but Autopilot should not require a special session_start on every host.
Alternatively, document that HTTP mode requires projectRoot and that hosts must send MCP roots.
Actual Behavior
Every Grok chat in a non-home workspace starts with a failed project_context / search pair. Agents then call session_start and retry. Extra latency and failed first-turn memory.
Environment
- Memorix 1.4.3,
serve-httpcwd=$HOME - Client: Grok HTTP MCP, workspace
/private/tmp memorix_session_start({ projectRoot })binds correctly afterwards (~8–500ms)
Additional Context
Log on startup:
[memorix] HTTP transport starting on 127.0.0.1:3211
[memorix] Project root: /private/tmp # or $HOME depending on start cwd
projectRoot is args.cwd || MEMORIX_PROJECT_ROOT || process.cwd(). There is no per-request workspace from the MCP client unless session_start is used.
Same investigation as #196 (store hang), #197 (idle session), #199, #200.
1.6.1 已重新验证 HTTP 的项目绑定:服务从无绑定状态启动,客户端必须通过 roots 或显式 projectRoot 绑定;无根目录时直接 fail closed,不会再偷偷使用服务启动目录。别名路径也会按同一个真实项目处理。
Still happens on 1.6.0 (2026-08-17). Cursor stdio and HTTP clients that omit projectRoot bind the server cwd ($HOME for LaunchAgent / some plugins). On Linux this also created an empty decoy $HOME/memorix.db (0 observations) next to the real ~/.memorix/data/memorix.db (~64k rows).
New write-up: #225. Binding with memorix_session_start({ projectRoot }) still recovers the session; most Autopilot hosts do not send that on the first call.