neuralmind.uk / NeuralMind v4.13.0 — the index stays fresh after pulls, merges, branch switches and rebases, and the git hooks work whatever PATH the git client has; usage and learning you can see, a grace period for staleness gates, MCP calls attributed to their client, and no silent leftover graphify graph Edit this page on GitHub ↗

NeuralMind v4.13.0 — the index stays fresh after pulls, merges, branch switches and rebases, and the git hooks work whatever PATH the git client has; usage and learning you can see, a grace period for staleness gates, MCP calls attributed to their client, and no silent leftover graphify graph

Type: Minor release Theme: neuralmind init-hook keeps the index in step with the checked-out tree — not only with local commits — without making git wait, and without touching throwaway worktrees

Until now init-hook installed one rebuild hook, post-commit. A git pull that brought in merged work, a branch switch, a merge or a rebase changed the files on disk without a local commit, and the index went on describing the old tree until the next one, with nothing to say so. The hook also found neuralmind with command -v, so a git client whose PATH lacks the install directory — GUI clients, IDEs, agents started by launchd or systemd, with pipx and venv installs living in ~/.local/bin — skipped it without a word. And every commit waited for the rebuild. The field report is #630.


What changed

Git hooks

Observability for agents that depend on NeuralMind daily

A field report from a team running NeuralMind across two repositories, with Claude Code on a Mac and a local Hermes-Agent both pointed at the same projects, found the core path fast and the edges silent: no way to tell whether the index was being used, which agent made a call, or that a graph file in the repository was no longer read. This release closes three of those gaps.

FIPS-mode hosts

What the agent actually sees

The index an agent queries matches the checked-out tree after a pull, branch switch, merge or rebase, not only after a local commit. A commit an agent makes returns before the rebuild finishes, and the hook prints one line — [neuralmind] Rebuilding the index in the background (log: ./.neuralmind/hook-build.log) — instead of the two it printed around a foreground rebuild. A commit in a worktree nobody built prints nothing from NeuralMind.

neuralmind metrics . (and the dashboard’s /api/metrics) now report the agent’s queries, so whoever runs the agent can see that it uses the index and when it last did. An MCP call’s audit event names the agent that made it:

{"action": "mcp_call", "actor": "anonymous", "actor_role": "builder",
 "details": {"client": {"name": "claude-code", "version": "2.1.0"}, "role": "builder"}, ...}

An agent that asks query --explain --json gets the reasons with the context, so it can check which files and scores the answer rests on before trusting it.

A build an agent runs now ends with the synapse line, for example Synapses: 3,612 edges (+47 since last build), 0 transitions (+0) followed by what produces transitions. A cron job or CI step that runs neuralmind health . --stale-after 30m stops paging while a watcher catches up and pages once it falls behind for longer.

Per-agent expectations

Agent What changes
Claude Code (hooks + MCP) The index follows git operations, not only commits; commits it runs return before the rebuild; its MCP calls are attributed to claude-code in the audit log; no hook, MCP tool or response field changed
Cursor / Cline / Continue (MCP) Same; each call’s audit event names the client by its own clientInfo name
Hermes-Agent plugin Same; its prompt-time recall was already counted in neuralmind metrics, and queries Hermes makes through the MCP server are now counted too
Generic MCP client Same; a client that sends no clientInfo (allowed from the 2026-07-28 protocol on) is recorded without a client field

Upgrading

Reproduce

pytest tests/test_init_hook_lifecycle.py -v
pytest tests/test_usage_metrics.py tests/test_metrics.py tests/test_mcp_security.py -v
pytest tests/test_index_freshness.py -k "graphify or StaleAfter or Health" -v
pytest tests/test_cli_exit_codes.py -v
python scripts/mcp_stdio_smoke.py

# FIPS-mode hosts: the static check, then the whole suite under the provider
pytest tests/test_fips_hash_usage.py -v
bash scripts/setup_fips_openssl.sh ~/.cache/openssl-fips
OPENSSL_CONF=~/.cache/openssl-fips/openssl-fips.cnf \
  OPENSSL_MODULES=~/.cache/openssl-fips pytest tests/

The end-to-end tests drive real git with a fake neuralmind that records its calls, a PATH that cannot find it, and a deliberately slow build: git returns before the build ends, each new trigger rebuilds, a file checkout doesn’t, a burst of three commits costs two builds, a dead build’s lock is cleared, and a worktree whose .neuralmind/ a session hook created is left alone while the main checkout rebuilds.