You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit e1405ea
Browse filesBrowse the repository at this point in the historyBrowse files
`auto_index` is off by default. When enabled, new projects are indexed automatically on first connection. The configurable file limit is `config set auto_index_limit 50000`. Previously indexed projects can be watched independently through `auto_watch` (on by default), subject to the session rules below.
256
+
`auto_index` is off by default. When enabled, new projects are indexed automatically on first connection. The configurable file limit is `config set auto_index_limit 50000`. Previously indexed projects can be watched through `auto_watch` (on by default), subject to its global setting and session ownership.
257
257
258
-
The watcher follows MCP sessions: it watches the project each open MCP session is rooted in (the client's working directory) and stops when the last session for that project closes. A repository indexed with `cli index_repository`, or indexed from a session rooted somewhere else, is not watched; re-run `index_repository` after changing it. `index_status` reports this in its `watch` object: `watched`, and either the poll cadence and last scan time or the `reason` it is not watched.
258
+
Each initialized, long-lived MCP session can register its root project when it connects and any target from a successful `index_repository` call, including custom project names and roots in another worktree. While `auto_watch`is enabled, these watches belong to the registering sessions and remain while at least one owning session is connected; closing the last owner removes the watch. An async index registers its target only after success and while its requesting session remains connected. CLI indexing and failed MCP indexes do not register watches. Global `auto_watch` controls registration and removes all watches on the next refresh or registration request when set to `false`. `index_status` reports this in its `watch` object: `watched`, and either the poll cadence and last scan time or the `reason` it is not watched.
259
259
260
-
Watcher registration is controlled separately by `auto_watch` (default `true`). Set `config set auto_watch false` to keep a session from registering its project with the background watcher; useful when working across many projects and you want each session contained to explicit indexing.
260
+
Watcher registration is controlled globally by `auto_watch` (default `true`). On the next refresh or registration request, `true` allows MCP sessions to register their root on connect and their successful `index_repository` targets; `false` removes all watches. CLI indexing and failed MCP indexes do not add watches.
261
261
262
-
To turn the watcher off entirely, set `config set watcher_enabled false` (default `true`): the background poll thread never starts and no project is registered, while `auto_index` and manual `index_repository` keep working. Unlike `auto_watch`, which is consulted per session, `watcher_enabled` is read once when the background daemon starts, so run `codebase-memory-mcp daemon stop` after changing it; reconnecting your MCP client alone will not restart the daemon. See [docs/CONFIGURATION.md](docs/CONFIGURATION.md#2-cli-managed-runtime-settings).
262
+
To turn the watcher off entirely, set `config set watcher_enabled false` (default `true`): the background poll thread never starts and no project is registered, while `auto_index` and manual `index_repository` keep working. Unlike `auto_watch`, which takes effect on the next refresh or registration request, `watcher_enabled` is read once when the background daemon starts, so run `codebase-memory-mcp daemon stop` after changing it; reconnecting your MCP client alone will not restart the daemon. See [docs/CONFIGURATION.md](docs/CONFIGURATION.md#2-cli-managed-runtime-settings).
263
263
264
264
The watcher follows **git** projects only by default: a project indexed from a directory that is not a git repository is not watched and stays at its last index until you run `index_repository` again. To have such roots polled too, set `config set watch_non_git true` (default `false`, read when the daemon starts): they are then checked on the same cadence with a file-tree scan that uses the indexer's own ignore rules.
265
265
@@ -402,7 +402,7 @@ In this repository, test narrowing is wired to the Linux x86_64 test leg when `T
402
402
403
403
### Distribution & operation
404
404
-**Native runtime set, zero infrastructure services**: SQLite-backed, persists to `~/.cache/codebase-memory-mcp/`
405
-
-**Auto-sync**: Background watcher detects file changes in the project an MCP session is working in and re-indexes it automatically (other indexed repos: re-run `index_repository`)
405
+
-**Auto-sync**: Background watcher detects file changes in projects registered by active MCP sessions, including successful explicit `index_repository` targets, and re-indexes them automatically.
406
406
-**Route nodes**: REST endpoints are first-class graph entities
| Claude Code | Detected |`~/.claude.json`| Skill + three exact-tool graph agents; `SessionStart`, `SubagentStart`, non-blocking `PreToolUse` for `Grep`/`Glob`/`Bash`, post-`Read` coverage, and a drift note after repeated searches without a graph call|
| Cline | Detected |`~/.cline/mcp.json` + `${CLINE_DATA_DIR:-~/.cline/data}/settings/cline_mcp_settings.json`| Rule + skill; automatic file hooks withheld because they auto-activate and their output is not reliably consumed; child agents cannot use MCP |
715
715
| Warp | Detected, skill only | UI, Warp Drive, or per invocation (manual) | Shared `~/.agents/skills/codebase-memory/SKILL.md`|
716
716
| Qwen Code | Detected |`.qwen/settings.json`|`QWEN.md`, skill, three explicit read/graph-tool agents; `SessionStart`, `SubagentStart`, and post-`ReadFile` coverage |
@@ -751,7 +751,14 @@ Hooks installed by this project are fail-open and context-only. Claude Code's
751
751
`PreToolUse` observes `Grep`/`Glob`/`Bash` and injects matching graph symbols as
752
752
`additionalContext`; `PostToolUse` on `Read` adds targeted coverage context when
753
753
the graph could not fully parse or index that file. It never denies or replaces
754
-
the requested tool call.
754
+
the requested tool call. Codex CLI's `PreToolUse` on `Bash` gives its shell
755
+
searches the same context. GitHub Copilot CLI and VS Code's Copilot runtime get
756
+
it after the search: their `preToolUse` can only decide permissions, so a
757
+
`PostToolUse` entry for `Bash`, `Grep` and `Glob` appends the graph symbols to
758
+
the tool result. In Claude Code, once a session has run three searches with no
759
+
codebase-memory-mcp tool call, the next augmentation adds one line saying so;
760
+
the next note comes after six searches, then twelve. Claude's `PostToolUse`
761
+
entry also matches the graph tools, and a graph tool call resets the count.
755
762
756
763
Claude Code, Codex CLI, Qwen Code, GitHub Copilot CLI, and VS Code's Copilot
757
764
runtime receive paired session/subagent context where the vendor exposes a
@@ -873,7 +880,7 @@ Tools requiring arguments accept JSON piped on stdin. Tools with only optional a
873
880
874
881
| Tool | Description |
875
882
|------|-------------|
876
-
|`index_repository`| Index a repository into the graph. Auto-sync keeps it fresh only while it is the project of an open MCP session; repos indexed from the CLI or from another project's session need a re-run (`index_status` shows `watch`). Waits for the whole index by default; pass `async: true` to start it in the daemon and return at once, then poll with `status: true` (see below). |
883
+
|`index_repository`| Index a repository into the graph. A successful call from an active MCP session registers the target for auto-sync while that session remains connected, subject to the global `auto_watch` setting; CLI calls do not register watches. Waits for the whole index by default; pass `async: true` to start it in the daemon and return at once, then poll with `status: true` (see below). |
877
884
|`list_projects`| List indexed projects with paging; use `detail: "stats"` for node/edge counts and database sizes. |
878
885
|`delete_project`| Remove a project and all its graph data. |
879
886
|`index_status`| Check indexing status of a project. |
@@ -967,7 +974,7 @@ See [docs/cbmignore.md](docs/cbmignore.md) for the full `.cbmignore` how-to: syn
967
974
codebase-memory-mcp config list # show all settings
968
975
codebase-memory-mcp config set auto_index true# auto-index on session start
969
976
codebase-memory-mcp config set auto_index_limit 50000 # max files for auto-index
codebase-memory-mcp config set auto_watch false#remove/disable all background watches (default: true)
971
978
codebase-memory-mcp config set doc_candidates false# skip doc<->code candidate scoring on huge repos (default: auto = on for full, off for moderate/fast)
972
979
codebase-memory-mcp config set watcher_enabled false# stop the watcher thread entirely (default: true)
973
980
codebase-memory-mcp config set watch_non_git true# also poll non-git project roots (default: false)
0 commit comments