MentisDB Blog

Durable memory for AI agents

MentisDB 0.12.3.60 — Hotfix: settings that survive a restart

November 17, 2026

Our release process calls for two independent code reviews, one adversarial and one on correctness. For 0.12.2.59 they ran after it shipped, and both found a serious problem. This hotfix fixes them, and the fixes went through a second review of their own. It also closes two smaller security gaps those reviews found. Upgrade recommended, especially if you change settings from the dashboard.

Security notice. Saving a setting from the dashboard could leave a settings file the daemon only half-loads at its next start, so it could restart without its dashboard PIN or with bearer-token enforcement off, and say nothing. If you saved settings from the dashboard on 0.12.2.59 or earlier, check that MENTISDB_DASHBOARD_PIN and MENTISDB_BEARER_TOKEN_ACCESS in <MENTISDB_DIR>/.env are what you expect.

1. A saved setting could switch off your PIN

The Settings screen wrote each value into .env as raw text, and the daemon ignored errors when it loaded that file at startup. The .env parser gives up at the first line it cannot read and drops everything after it. A value with a space was enough, such as a list of network ranges or a folder name with a space in it. If your PIN or the bearer-token switch sat below that line, the next restart came up without it. A PIN containing $ loaded as a different PIN, and a PIN of only spaces saved fine and loaded as none.

Now values are written so they read back exactly, and we checked that against the real parser with 300,000 deliberately awkward values. Every save is read back before it replaces the file, and is refused if any setting would come out different. The file is replaced in one step instead of being rewritten in place. And the daemon no longer starts quietly with settings missing: if a .env it loads would drop one of its settings, it refuses to start and names the file and line. It never prints the line, which may hold your PIN.

2. Settings the daemon would misread are refused

The screen accepted any text for any setting. Some bad values stopped the next start, which also took down the dashboard you would use to fix them. Others, like 1.5 for a setting the daemon reads as a whole number, were saved and then quietly replaced by the default. Each value is now checked with the same rules the daemon applies at startup, and a bad one is refused with a message saying why.

3. Security settings need a PIN

On a dashboard without a PIN, anyone who could reach it could change the settings that protect the daemon, such as which networks webhooks may call and which host names the dashboard answers to. Those settings, along with TLS, the bind address, bearer-token enforcement, the data folder, the log file and the update source, now need a PIN and a signed-in session. Without one they show as locked. Everything else, including setting the PIN itself, still works without one.

4. A revoked token loses the event stream

The MCP event stream checked its token only when it opened, and since 0.12.2.59's keepalive a stream can stay open for days. Revoking the token did not close it. The stream now re-checks its token every 15 seconds and closes when the token is no longer valid.

5. source_episode filters, for real

0.12.2.59 made source_episode searchable, but combined with a tag, type, role or agent filter it was silently ignored, so a search for one episode's deploy thoughts returned every episode's. That now works across every search route, traversal and the CLI, and entity_type had the same gap. Episode names are also trimmed, so "standup " finds "standup".

Benchmarks

Retrieval is unchanged: on the same data, this release and 0.12.2.59 return the same results with identical scores for every LongMemEval question, and append speed is the same.

Upgrading

No migration and no library break. Restart the daemon after upgrading. If it refuses to start, the file and line it names were already dropping your settings: fix that line by hand and start again. The release notes list every change.

cargo install mentisdb --locked --force
# or
docker pull ghcr.io/cloudllm-ai/mentisdb:0.12.3.60