neuralmind.uk / NeuralMind v4.21.0 — an agent that can see NeuralMind: MCP server instructions, a six-tool default list, and the leading file’s code in the prompt block Edit this page on GitHub ↗

NeuralMind v4.21.0 — an agent that can see NeuralMind: MCP server instructions, a six-tool default list, and the leading file’s code in the prompt block

Type: Minor release Theme: getting what NeuralMind finds in front of the agent, measured before and after

The task-outcome pilot ran the same agent on 20 real bug fixes with and without NeuralMind: 120 runs. NeuralMind made no difference: median cost per task +0.0% (95% CI −5.2% to +8.6%), 18 of 20 tasks solved either way. Replaying what NeuralMind gave the agent in those runs, with no agent and no API cost, showed why:

This release changes both, and the agent’s behaviour on those 20 tasks didn’t change: an exploratory rerun with this release found the agent still called no NeuralMind tool, and searched as much before its first edit as without NeuralMind (measured after). What the release does change, and what it doesn’t, is below.


What changed

The MCP server says what it’s for

The server now sends instructions in its initialize reply. Claude Code shows a server’s instructions to the model even while that server’s tools are deferred. They say: to find where something is implemented, or the code behind a bug from its symptom, call neuralmind_search before Grep or Glob; neuralmind_query to understand how a part works; neuralmind_skeleton, neuralmind_impact and neuralmind_query_decisions for structure, dependents and recorded decisions; and to start from a prompt’s NeuralMind block when it has one.

Asked, before calling anything, which tool it would use to find the code behind a bug, Claude Code 2.1.287 on Sonnet 5.5 answered “NONE” with v4.15.1’s server, and “neuralmind_search”, quoting the instructions, with this one.

tools/list offers six tools by default

neuralmind_search, neuralmind_query, neuralmind_skeleton, neuralmind_impact, neuralmind_wakeup and neuralmind_query_decisions. The other 22 (build, stats, benchmark, savings, the synapse tools, health, review, compliance report, document ingestion, and the rest of the decision tools) are still served: a client that calls one by name gets the same answer as before. They’re just not in the list an agent chooses from.

NEURALMIND_MCP_TOOLS tools/list offers
unset, empty or core the six above
all all 28, as before v4.21.0
name,name,… those tools (unknown names are ignored)

The prompt block shows the leading file’s code

When one file clearly leads the prompt’s matches (their summed score is at least twice the next file’s), the block the UserPromptSubmit hook adds (and the Hermes plugin’s pre_llm_call hook) now quotes that file’s best-matching function or class:

Code matching this prompt:
- neuralmind/secret_scan.py: redact_text() L479, scan_text() L402, …
- neuralmind/output_cache.py: …
Most matches are in neuralmind/secret_scan.py. Its best match, L348-L377 (read the file before you edit it):
```
def _scan_line(…):
    …
```

evals/task_outcome/replay.py: the hook, scored offline, in CI

It exports each of the pilot’s 20 tasks at the fix’s parent commit, builds the index, sends the task’s prompt through neuralmind _hook prompt-submit, and scores the block against the fix’s own diff. A new workflow, Prompt-recall replay, runs it on every pull request that touches the recall path and fails below its floors. Measured on this release:

Of 20 tasks v4.21.0
The block names a file the fix changed 17
…and names it first 10
The block quotes code 9
…from a file the fix changed 7 of 9
…covering lines the fix changed 2 of 9

The last row is the honest limit of the excerpt. The best-matching symbol is usually in the right file, and usually not the function the fix touched: a symptom reads like what the code is about, not where it breaks. The excerpt’s gate was set on these same 20 prompts, so 7 of 9 is a ceiling, not an estimate.

Measured after: the agent’s behaviour didn’t change

An exploratory rerun (not pre-registered) ran the pilot’s 20 tasks again, 3 times each, with this release in the NeuralMind arm. Same model, Claude Code version, prompts and budget, against the pilot’s baseline runs:

Per task, 60 runs each Without NeuralMind v4.15.1 (pilot) v4.21.0
Runs calling a NeuralMind tool 0 0 0
Search or read calls before the first edit (median) 4.0 4.2 4.0
Turns (median) 10.3 10.8 10.3
Runs solved 53 55 55

On these tasks an agent finds the file to fix in about four searches with or without help, which leaves little to save. Whether NeuralMind changes the outcome on a larger, unfamiliar repository with harder fixes is not measured yet.


What the agent actually sees post-install

Agent Before v4.21.0 From v4.21.0
Claude Code 28 deferred tool names, nothing saying when to use one; a list of file names on each prompt Six deferred tool names and the server’s instructions on when to call them; on a prompt where one file clearly leads, that file’s best match as code
Cursor / Cline / Continue All 28 tools with descriptions in the tool list The six core tools, with the server’s instructions where the client shows them; NEURALMIND_MCP_TOOLS=all in the server’s environment restores the full list
Hermes-Agent plugin A list of file names on each turn (pre_llm_call) The same block, with the leading file’s code when one leads
Generic MCP client 28 tools Six listed; all 28 still answer when called by name

Upgrading

New environment variables

Variable Default Effect
NEURALMIND_MCP_TOOLS core Which tools tools/list offers: core (six), all, or a comma-separated list of names
NEURALMIND_RECALL_EXCERPT on 0 leaves the leading file’s code out of the prompt block

Use cases