Skip to content

Commit 44a4914

Browse files
Alex Holmbergcursoragent
andcommitted
docs: align with 0.6.10 CLI and headless changes
Remove memtrace service/daemon install guidance, document --headless and MEMTRACE_HEADLESS, fix hook health URL, add Claude Code hook JSON troubleshooting, and mark legacy daemon.log / daemon env vars obsolete. Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent 4d2324f commit 44a4914

10 files changed

Lines changed: 112 additions & 66 deletions

docs/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@ look up later":
4646
| [`privacy-and-telemetry.md`](privacy-and-telemetry.md) | What stays on your machine, what's optionally sent to us, how to turn telemetry off. |
4747
| [`v0.4.60-release-notes.md`](v0.4.60-release-notes.md) | The memory-footprint round: −15% RSS, 35× tighter variance, −41% binary, no behaviour change. Two new env knobs (`MEMTRACE_UNIFIED_CACHE_MB`, `MEMTRACE_ORT_LOW_RSS`); both have sensible defaults. |
4848

49+
**0.6.10 highlights** (see also [`cli-reference.md`](cli-reference.md) and [`environment-variables.md`](environment-variables.md)): fixes for GitHub issues #7#17 (Claude Code hook JSON, graph/stats/temporal accuracy), unified `--headless` / `MEMTRACE_HEADLESS`, and removal of `memtrace service` / OS login autostart.
50+
4951
## The 90-second tour
5052

5153
```bash

docs/architecture.md

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -107,13 +107,17 @@ On a fresh repo, run `memtrace index .`, run `memtrace start` and let
107107
auto-index finish, or let an MCP-enabled agent call `index_directory`
108108
before expecting graph-backed answers.
109109

110-
### Headless service mode
110+
### Headless / background runtime
111111

112-
When you want Memtrace to stay available without an open terminal, use
113-
the daemon service commands (`memtrace daemon install`, then
114-
`memtrace daemon start`) where supported. That gives the machine a
115-
background workspace owner. Later `memtrace mcp` processes attach to
116-
it instead of opening their own embedded MemDB.
112+
`memtrace start --headless` (or `MEMTRACE_HEADLESS=1`) keeps the HTTP
113+
API on `:3030` without auto-opening a browser tab. For a persistent
114+
owner without a visible terminal, run that command under tmux, screen,
115+
or your own supervisor.
116+
117+
OS login autostart (`memtrace service install` / `memtrace daemon`)
118+
was removed in **0.6.10**. Agent-only workflows can rely on
119+
`memtrace mcp`, which attaches to an existing owner or becomes the
120+
owner for that session.
117121

118122
## How duplicate owners are avoided
119123

docs/cli-reference.md

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,10 @@ memtrace --help
1818
| Command | Purpose |
1919
|---|---|
2020
| `memtrace start` | Start the local UI/API server, file watcher, PR command loop, and workspace owner against MemDB. This is also the default command when you run `memtrace` with no subcommand. |
21-
| `memtrace stop` | Stop the running Memtrace daemon. |
21+
| `memtrace stop` | Stop the running `memtrace start` workspace runtime (and unload any legacy OS service registrations from older installs). |
2222
| `memtrace status` | Show backend, index, and runtime status. |
2323
| `memtrace mcp` | Run the MCP server for Claude, Cursor, Codex, and other MCP-compatible agents. It attaches to an existing workspace owner or becomes the owner if none is running. |
2424
| `memtrace index <path>` | Index a repository or workspace into MemDB, then exit. |
25-
| `memtrace daemon install/start/status/stop` | Install or control the optional background service where supported. |
2625
| `memtrace code-review setup` | Choose the default headless agent for `@memtrace fix this`. |
2726
| `memtrace code-review --pr <url>` | Review a GitHub pull request using local Memtrace context. |
2827
| `memtrace pr status` | Show local PR watches registered by `memtrace code-review --post --watch`. |
@@ -65,8 +64,10 @@ owners for the same workspace.
6564
| `--clear`, `--fresh` | `start`, `index` | Wipe the resolved local MemDB data directory before connecting. |
6665
| `--workspace <path>` | `start`, `index`, `mcp` workspace resolution | Treat `path` as a multi-repo workspace root and write a `.memtrace-workspace` marker there. |
6766
| `--no-workspace` | `start` | Disable the auto-workspace behavior when the current directory looks like a parent folder containing multiple git repos. |
68-
| `--no-ui`, `--headless` | `start` | Skip the HTTP UI/API server entirely (no bind on `MEMTRACE_UI_PORT`). Use when you truly do not need health, search, or the value ledger. |
69-
| `--no-browser` | `start` | Keep the HTTP UI/API server on `MEMTRACE_UI_PORT` but do not auto-open a browser tab on startup. Prefer this for Orbit, CI, and headless hosts that still need `:3030`. |
67+
| `--headless` | `start` | Keep the HTTP API on `MEMTRACE_UI_PORT` (default `3030`) but do not auto-open a browser tab. Use for Orbit, CI, and agent hosts. |
68+
| `--no-ui`, `--no-browser` | `start` | **Deprecated aliases** for `--headless` (one-time note on first use). Prefer `--headless` or `MEMTRACE_HEADLESS=1`. |
69+
70+
> **Removed in 0.6.10:** `memtrace service` / `memtrace daemon` (OS login autostart install) was removed. Use `memtrace start` (optionally `--headless`) or `memtrace mcp`. `memtrace stop` still tears down legacy launchd/systemd/Windows service registrations if an older install left them behind.
7071
7172
## Code review
7273

@@ -174,9 +175,10 @@ MEMTRACE_UI_PORT=3030
174175

175176
| Variable | Purpose |
176177
|---|---|
177-
| `MEMTRACE_UI_PORT` | Local UI port. Default: `3030`. |
178-
| `MEMTRACE_NO_UI` | Skip HTTP UI/API server (`1`, `true`, `yes`, or `on`). |
179-
| `MEMTRACE_NO_BROWSER` | Keep UI server; skip auto-open browser on start. |
178+
| `MEMTRACE_UI_PORT` | Local HTTP API + dashboard port. Default: `3030`. |
179+
| `MEMTRACE_UI_HOST` | Bind address for the HTTP API. Default: `127.0.0.1`. Set only when you intentionally need remote/VM/container exposure. |
180+
| `MEMTRACE_HEADLESS` | Skip browser auto-open on `memtrace start` (`1`, `true`, `yes`, or `on`). API stays up. |
181+
| `MEMTRACE_NO_UI`, `MEMTRACE_NO_BROWSER` | Deprecated aliases for `MEMTRACE_HEADLESS`. |
180182
| `MEMTRACE_TRANSPORT` | MCP transport: `stdio`, `streamable-http`, `sse`, or `http`. |
181183
| `MEMTRACE_PORT` | MCP HTTP port when transport is not stdio. |
182184
| `MEMTRACE_DATA_DIR` | Job state directory. |
@@ -185,7 +187,8 @@ MEMTRACE_UI_PORT=3030
185187
| `MEMTRACE_MEMDB_ENDPOINT` | Remote-mode MemDB gRPC endpoint. |
186188
| `MEMTRACE_EMBED_MODEL` | Local embedding preset when using local embeddings. |
187189
| `MEMTRACE_VECTOR_DIMS` | Explicit vector dimension override. Prefer `memtrace embed set` for normal use. |
188-
| `MEMTRACE_SKIP_EMBED` | Skip embedding work. Structural graph remains usable. |
190+
| `MEMTRACE_SKIP_EMBED` | Skip all embedding (index, watcher, search). Structural graph remains usable. |
191+
| `MEMTRACE_SKIP_WATCHER_EMBED` | Skip per-save watcher embedding only; keep index-time embed. |
189192
| `MEMTRACE_NO_REPLAY` | Skip git-history replay. HEAD graph remains usable. |
190193
| `MEMTRACE_OWNER_ATTACH` | Set to `0` to force legacy direct embedded open for debugging. |
191194
| `MEMTRACE_START_PHASE2` | Set to `foreground` to run embedding/replay in the foreground instead of background phase 2. |

docs/data-directories.md

Lines changed: 10 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ when (if ever) to delete it.
2222
├── auth/ ← session tokens (one file)
2323
├── config.toml ← persistent embedder choice — see embedding-providers.md
2424
├── last_health.json ← last `memtrace embed test` probe result
25-
├── logs/ ← daemon.log + rotated history (v0.3.89)
25+
├── logs/ ← legacy daemon.log from pre-0.6.10 OS service installs (if any)
2626
├── session-ledger.jsonl ← user-global MCP tool-call ledger (v0.3.89)
2727
├── watches.json ← persistent watch_directory registrations (v0.3.89)
2828
└── telemetry/ ← buffered events (only if telemetry is ON)
@@ -263,25 +263,17 @@ crashes (useful for your own debugging), but the flusher never
263263
ships it. If you've never run `memtrace start`, the directory
264264
doesn't exist yet.
265265

266-
## `~/.memtrace/logs/daemon.log` (v0.3.89)
266+
## `~/.memtrace/logs/` (legacy)
267267

268-
Daemon startup + error log. Rolling file appender:
268+
Versions before **0.6.10** that used `memtrace daemon install` may
269+
have left rolling logs here (`daemon.log` + dated rotations). Current
270+
binaries do not write this file — runtime diagnostics go to stderr;
271+
use `RUST_LOG=info memtrace start` or `MEMTRACE_DEBUG=1` when
272+
debugging startup failures.
269273

270-
```
271-
~/.memtrace/logs/
272-
├── daemon.log # current
273-
├── daemon.2026-05-10.log
274-
├── daemon.2026-05-09.log
275-
└── … # up to 5 files retained, rotated at 10 MB each
276-
```
277-
278-
Populated from the first daemon-startup tick, so even an
279-
"exits-immediately" failure leaves a breadcrumb. Created on first
280-
`memtrace daemon start` after upgrading to v0.3.89.
281-
282-
Override the location with `MEMTRACE_LOGS_DIR=<absolute path>` if
283-
you want logs somewhere else. Safe to delete the directory at any
284-
time — it'll be recreated on the next daemon start.
274+
Safe to delete the directory at any time. It is not recreated unless
275+
you still have a legacy OS service registration from an older install
276+
(in which case `memtrace stop` unloads it).
285277

286278
## `~/.memtrace/session-ledger.jsonl` (v0.3.89)
287279

docs/environment-variables.md

Lines changed: 24 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ the defaults auto-tune to your machine.
1414
- [Resource caps](#resource-caps)
1515
- [Install / uninstall lifecycle (v0.3.89)](#install--uninstall-lifecycle-v0389)
1616
- [Watch persistence (v0.3.89)](#watch-persistence-v0389)
17-
- [Daemon lifecycle (v0.3.89)](#daemon-lifecycle-v0389)
17+
- [Headless / browser (v0.6.10)](#headless--browser-v0610)
18+
- [Legacy daemon lifecycle (removed v0.6.10)](#legacy-daemon-lifecycle-removed-v0610)
1819
- [MemDB connection (advanced)](#memdb-connection-advanced)
1920
- [Telemetry + auth](#telemetry--auth)
2021

@@ -24,9 +25,11 @@ the defaults auto-tune to your machine.
2425
|---|---|---|
2526
| `MEMTRACE_TRANSPORT` | `stdio` | How `memtrace mcp` talks to its agent. See [`mcp-and-transports.md`](mcp-and-transports.md). Values: `stdio`, `streamable-http`, `sse` (alias for streamable-http), `http` (alias for streamable-http). Anything else is rejected with a clear error since v0.3.32. |
2627
| `MEMTRACE_PORT` | `3000` | When transport is HTTP, the port `memtrace mcp` binds. |
27-
| `MEMTRACE_UI_PORT` | `3030` | The local dashboard. Always-on while the daemon is running (unless `MEMTRACE_NO_UI` / `--no-ui`). |
28-
| `MEMTRACE_NO_UI` | (unset) | Set to `1` to skip the HTTP UI/API server entirely. Alias: `MEMTRACE_HEADLESS`. |
29-
| `MEMTRACE_NO_BROWSER` | (unset) | Set to `1` to keep the UI server on `MEMTRACE_UI_PORT` but skip auto-opening a browser tab on `memtrace start`. Same as `--no-browser`. |
28+
| `MEMTRACE_UI_PORT` | `3030` | Local HTTP API + dashboard port while `memtrace start` (or an attached owner) is running. |
29+
| `MEMTRACE_UI_HOST` | `127.0.0.1` | Bind address for the HTTP API. Set to `0.0.0.0` only when you intentionally need remote/VM/container exposure. |
30+
| `MEMTRACE_HEADLESS` | (unset) | Set to `1` to skip auto-opening a browser tab on `memtrace start`. The API stays bound on `MEMTRACE_UI_PORT`. Same as `--headless`. |
31+
| `MEMTRACE_NO_UI` | (unset) | **Deprecated alias** for `MEMTRACE_HEADLESS` (skips browser only — does not disable the HTTP API). |
32+
| `MEMTRACE_NO_BROWSER` | (unset) | **Deprecated alias** for `MEMTRACE_HEADLESS`. Prefer `MEMTRACE_HEADLESS=1` or `memtrace start --headless`. |
3033
| `MEMTRACE_WS_PORT` | `3031` | Internal WebSocket bus that pushes index events to the UI. Don't change unless 3031 is taken. |
3134

3235
## On-disk locations
@@ -68,6 +71,8 @@ the defaults auto-tune to your machine.
6871
| `MEMTRACE_FIELD_BOOST_BODY_STRINGS` | `0.5` | **(v0.3.82)** BM25 weight on the new `body_strings` field (function-body string literals extracted at index time). Improves recall on natural-language → log-line queries. |
6972
| `MEMTRACE_DISABLE_COREML` | (unset) | Set to `1` on Apple Silicon to force CPU execution provider instead of CoreML / ANE. Useful if CoreML's first-run graph compile hangs on your machine. |
7073
| `MEMTRACE_TIER` | auto-detected (`light` / `standard` / `heavy`) | Force the host tier instead of letting Memtrace pick from RAM + CPU + accelerator signals. |
74+
| `MEMTRACE_SKIP_EMBED` | (unset) | Set to `1` to disable **all** embedding (index, watcher, semantic search). Structural graph tools still work. |
75+
| `MEMTRACE_SKIP_WATCHER_EMBED` | (unset) | Set to `1` to disable per-save watcher embedding only; index-time embedding still runs. |
7176

7277
## Reranker
7378

@@ -126,7 +131,7 @@ Branch switch (`git checkout other-branch`) re-targets the watcher to the new ac
126131
|---|---|---|
127132
| `MEMTRACE_HOOK_MODE` | `advisory` | Set to `off` for unconditional no-op of the UserPromptSubmit hook. |
128133
| `MEMTRACE_HOOK_DEBOUNCE_SECS` | `120` | Per-session debounce window. After the hook fires once for a session, suppresses further fires within this window. Set to `0` to disable debounce (every message fires). |
129-
| `MEMTRACE_HEALTH_URL` | `http://localhost:3030/health` | Where the hook probes daemon liveness. Override for non-default UI ports. |
134+
| `MEMTRACE_HEALTH_URL` | `http://localhost:3030/api/health` | Where the Claude Code `UserPromptSubmit` hook probes runtime liveness. Override for non-default UI ports. |
130135

131136
Session ID resolution (used to key the lock file at `~/.memtrace/hook-debounce/<session_id>.lock`):
132137
1. `CLAUDE_SESSION_ID` env (if Claude Code sets it)
@@ -159,16 +164,23 @@ After @Magalz's report that `watch_directory` registrations vanished on MCP disc
159164

160165
The watch file is a JSON array of `{ path, repo_id, registered_at, origin }` objects; `origin` is `"manual"` for entries you registered explicitly via `watch_directory` and `"restored"` for entries that were re-armed from a prior session.
161166

162-
## Daemon lifecycle (v0.3.89)
167+
## Headless / browser (v0.6.10)
163168

164-
After @Magalz's report that `memtrace daemon start` was reporting "started" while the daemon silently exited 2-3 s later on Windows, the launcher now health-checks before declaring success.
169+
`memtrace start --headless` (or `MEMTRACE_HEADLESS=1`) keeps the HTTP API on `:3030` but skips auto-opening a browser tab. This is the recommended mode for Orbit, CI, and agent hosts that need health/search endpoints without a GUI session.
165170

166-
| Var | Default | Purpose |
167-
|---|---|---|
168-
| `MEMTRACE_DAEMON_HEALTH_TIMEOUT_MS` | `10000` | How long `memtrace daemon start` polls `/api/health` before giving up and printing the "did not bind within Ns" warning. Increase on slow / cold-cache Windows hosts. |
169-
| `MEMTRACE_DAEMON_HEALTH_INTERVAL_MS` | `500` | Polling interval. |
171+
Legacy names `--no-ui`, `--no-browser`, `MEMTRACE_NO_UI`, and `MEMTRACE_NO_BROWSER` still work as aliases and print a one-time deprecation note.
172+
173+
## Legacy daemon lifecycle (removed v0.6.10)
174+
175+
`memtrace service` / `memtrace daemon install|start|status|stop` was removed in **0.6.10**. Use `memtrace start` (foreground or `--headless` in tmux/screen/nohup) or `memtrace mcp` for agent workflows. `memtrace stop` still unloads legacy launchd/systemd/Windows service registrations if an older install left them behind.
176+
177+
The following env vars are **obsolete** and ignored by current binaries:
170178

171-
The daemon now also writes `~/.memtrace/logs/daemon.log` (rotated at 10 MB, max 5 files) from its first startup tick, so even an "exits immediately" failure leaves a breadcrumb. Run `memtrace daemon start --foreground` (alias `--verbose`) to skip the detach and see stderr directly in your shell.
179+
| Var | Was used for |
180+
|---|---|
181+
| `MEMTRACE_DAEMON_HEALTH_TIMEOUT_MS` | `memtrace daemon start` health poll (removed) |
182+
| `MEMTRACE_DAEMON_HEALTH_INTERVAL_MS` | `memtrace daemon start` health poll interval (removed) |
183+
| `MEMTRACE_LOGS_DIR` | Override for `~/.memtrace/logs/daemon.log` (file logging removed with OS service install) |
172184

173185
## MemDB connection (advanced)
174186

docs/getting-started.md

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -134,17 +134,22 @@ tools will have little or no project context until you run
134134
`memtrace index .`, run `memtrace start` and let auto-index finish,
135135
or ask an MCP-enabled agent to call `index_directory`.
136136

137-
If you want Memtrace available without an open terminal, use the
138-
daemon service commands where supported:
137+
If you want Memtrace available without an open browser tab (Orbit,
138+
CI, headless servers), start the workspace runtime in headless mode:
139139

140140
```bash
141-
memtrace daemon install
142-
memtrace daemon start
141+
memtrace start --headless
142+
# or: MEMTRACE_HEADLESS=1 memtrace start
143143
```
144144

145-
That gives the machine a background workspace owner. Later
146-
`memtrace mcp` processes attach to it instead of opening another
147-
embedded MemDB.
145+
The HTTP API stays on `http://localhost:3030`; only the browser
146+
auto-open is skipped. For a long-lived background owner without a
147+
visible terminal, run `memtrace start --headless` inside tmux,
148+
screen, or your process supervisor of choice.
149+
150+
> **Note (0.6.10):** `memtrace service` / `memtrace daemon install`
151+
> was removed. Most agent workflows only need `memtrace mcp`, which
152+
> attaches to an existing owner or becomes the owner for that session.
148153
149154
Working across several related repos (frontend + backend, a monorepo,
150155
a service mesh)? Index them under one **workspace** so they share a
@@ -208,7 +213,7 @@ After your first index:
208213
## Stopping and resetting
209214

210215
```bash
211-
memtrace stop # stop the running daemon
216+
memtrace stop # stop the running workspace runtime
212217
memtrace reset # wipe the local MemDB (ALL repos)
213218
memtrace reset <repoId> # wipe one repo's data only
214219
memtrace start --clear # wipe and re-index in one go

docs/mcp-and-transports.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -231,9 +231,10 @@ your AI tool's MCP setup guide for the current shape.
231231

232232
### Operational notes
233233

234-
- **Bind address is `0.0.0.0` by default.** If you need to restrict
235-
to localhost only, run Memtrace inside a container or reverse-proxy
236-
it. There's no built-in `bind=127.0.0.1` flag yet.
234+
- **HTTP API binds `127.0.0.1` by default** (since 0.6.0). Set
235+
`MEMTRACE_UI_HOST=0.0.0.0` only when you intentionally need
236+
remote/VM/container exposure. MCP HTTP transport (`MEMTRACE_PORT`)
237+
bind behaviour is separate — see your orchestrator setup.
237238
- **Port collisions.** If `MEMTRACE_PORT` is already in use, you'll
238239
get a clear error pointing at the env var. Pick a free port.
239240
- **Auth.** The HTTP transport doesn't enforce auth at the MCP layer —

docs/performance-tuning.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ memtrace start
171171
```
172172

173173
For multi-tenant (orchestrator) deployments, bind streamable-HTTP
174-
and let many agents share one daemon — see
174+
and let many agents share one workspace runtime — see
175175
[`mcp-and-transports.md`](mcp-and-transports.md).
176176

177177
### "Indexing Django takes 14s — I want it faster"

docs/telemetry-compliance-datasheet.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ For a regulated environment, the recommendation is: keep product telemetry enabl
2828
```
2929
Customer machine Memtrace infrastructure
3030
┌──────────────────────────┐ ┌──────────────────────────┐
31-
│ memtrace daemon │ │ │
31+
│ memtrace start runtime │ │ │
3232
│ ┌────────────────────┐ │ HTTPS (TLS 1.3) │ api.memtrace.io │
3333
│ │ AST parser │ │ ──────────────────▶ │ /api/device/auth │
3434
│ │ MemDB (local) │ │ License + heart- │ /api/device/heartbeat │

0 commit comments

Comments
 (0)