neuralmind.uk / NeuralMind v4.8.1 — installers that can’t destroy your config, and the bug-hunt fixes Edit this page on GitHub ↗

NeuralMind v4.8.1 — installers that can’t destroy your config, and the bug-hunt fixes

Type: Patch release Theme: Fixes from an end-to-end bug hunt

This release fixes the high- and medium-severity bugs found by testing v4.7.0 end to end. v4.8.0 still has all of them. Two of the eight high-severity ones could destroy user configuration. A third left credentials in plaintext in the Bash output cache, under a header that said they had been redacted.

  1. install-hooks and install-mcp no longer overwrite a config they can’t parse. One trailing comma in ~/.claude/settings.json was enough for install-hooks --global to replace the file with a bare hooks block, losing permissions, model and env. --uninstall deleted the file. install-mcp did the same to Cursor, Cline and Claude Desktop configs, removing every other MCP server along with the tokens in their env.
  2. The Bash output cache redacts what the AWS CLI prints. It also redacts JSON password keys and a few other common shapes it used to miss.
  3. Hooks do nothing in a project without .neuralmind/. With a global install, the prompt hook used to run a full first-time build in whatever directory a session opened in. That took minutes on a real repository, far past the hook timeout.

The other five: one non-UTF-8 doc no longer fails the build, rebuilds no longer duplicate doc edges, watch --reindex stops serving deleted symbols, and neuralmind export . works without --output.

The medium-severity fixes are listed under What changed. The ones you’re most likely to notice:

This release also carries two audit-log fixes that weren’t part of the bug hunt: neuralmind audit verify now checks the whole log, and neuralmind audit export -o reports the events it wrote. See Audit log.


What changed

Installers refuse a config they can’t round-trip

Secret redaction

These apply wherever redaction runs: the automatic Bash output cache behind neuralmind last, scan-for-secrets, and build --redact-secrets.

Hooks act only in a project that has .neuralmind/

Every hook action now returns at once, writing nothing, unless the project already has .neuralmind/. neuralmind build creates that directory, and so does any other command that stores state there, such as recording a decision. Before, a globally installed hook would:

Read dedup already followed this rule. Prompt-time recall also no longer builds an index in a project that has .neuralmind/ but no index yet (for example, one with only decision memory). It loads the existing index or injects nothing.

The project is the nearest directory with .neuralmind/, starting from the directory in the hook payload and going no higher than $CLAUDE_PROJECT_DIR. Claude Code sets that variable for hooks, and the payload’s directory follows the agent’s shell. Before, after cd auth the hooks treated auth/ as the project: they went silent, or, before the built-project rule, wrote a stray auth/.neuralmind/. Without $CLAUDE_PROJECT_DIR only the payload’s own directory counts, so an unrelated .neuralmind/ higher up is never used.

Hooks also fail open as documented. A payload that isn’t a JSON object, or a field of the wrong type, used to exit 1 with a traceback even under NEURALMIND_BYPASS=1. The bypass is now checked before the payload is read, and any error exits 0. The Read hook now finds the file text where Claude Code puts it (tool_response.file.content), so Read sequences reach the synapse layer.

Indexing and retrieval

Hooks, installers and the dashboard

Graph building

Run neuralmind build once after upgrading to pick these up.

Retrieval

Numbers the CLI reports

Synapse learning

Audit log

neuralmind audit verify passed logs it should have failed. In v4.8.0 and earlier:

  1. A record without a hash passed at the end of the log. The last records could be edited and their sha256 removed, or forged records appended with none.
  2. A line it couldn’t read was skipped, not reported. Garbage, a JSON value that isn’t an object, or an oversized line appended to a valid log left it passing. One invalid UTF-8 byte made it read no records at all and report ok.
  3. The stored prev_sha256 was never compared. The hash covers each record without its hash fields, so the link field could be changed or deleted freely.

All three now fail, each with the line number and the reason:

Still not detected: records deleted from the end, and a chain recomputed by anyone who can write the file, because the hash has no secret key. Keep an exported copy off the host (neuralmind audit export). Risk R-07 stays MEDIUM for that reason.

neuralmind audit export -o reports what it wrote. In v4.8.0 and earlier it printed the size of the whole audit log, whatever --since, --until, --category, --action or --actor kept, so a filtered export over an empty file said “Exported 7 events”. It now counts the records it writes, and says so when none matched the filters. Export to stdout is unchanged.

Both are CLI changes, so agents see no difference from them.

What the agent actually sees post-install

Agent Before After
Claude Code (MCP + hooks) With global hooks, the first prompt in an unbuilt repo could block on a full index build until the hook timed out, and .neuralmind/ appeared in every directory a session ran in. After cd into a subdirectory the hooks went silent. neuralmind_review after an edit returned security_denied. neuralmind last could replay AWS session credentials In an unbuilt repo the hooks do nothing and add no context. In a built one, recall never triggers a build, and the hooks keep working from any subdirectory. neuralmind_review and neuralmind_impact answer. AWS CLI credentials are redacted in the cache
Cursor / Cline / Claude Desktop (MCP) install-mcp on a config with a trailing comma removed every other server The config is left untouched, and the command prints the entry to paste
VS Code (MCP) JSONC was already left untouched. A config whose top level wasn’t an object was overwritten Both are left untouched
Generic MCP client neuralmind_review, neuralmind_impact and the neighbour tools returned security_denied under the default roles They answer under builder and reader

Environment variables

None added or changed.

Upgrade notes