Summary
On 0.78.0, an MCP edit is applied to the live document but never written to disk. The server's own staleness sweep detects the divergence every minute but never flushes it (divergent=1, forced=0). A retry of the same edit then returns Text not found in document, because the live doc already has the change. A later MCP delete returns HTTP 200, but the file stays on disk.
The same write → edit → delete round-trip passed on 0.76.1 (2026-09-20) and 0.77.1 (2026-09-22) on the same machine and vault. This looks like a regression in 0.78.0.
Environment
- OS: Windows 11 Pro
@inkeep/open-knowledge: 0.78.0 (npm global, stable latest)
- Node: v26.7.0
- Project: an Obsidian vault, ~780 clippings, git repo with a remote
- Server started fresh by the MCP client after upgrading from
0.77.1
Steps
- Fresh server on
0.78.0 (first start after upgrade).
- MCP
write: { document: { path: "ok-write-test-0.78.0", content: "# OK 0.78.0 write test\n\nline one." } }
- Client timed out. File landed on disk ~4 minutes later (log:
[persistence] Wrote .../ok-write-test-0.78.0.md (33 bytes)). OK.
- MCP
edit: { document: { path: "ok-write-test-0.78.0", find: "line one.", replace: "line one, edited." } }
- Client timed out. Log shows
[agent-write] applied agent markdown write. No [persistence] Wrote follows.
- Waited 3+ minutes. Disk still
line one.. exec("cat ok-write-test-0.78.0.md") also returns line one..
- Retried the same
edit → Error: Text not found in document.
- MCP
delete of the same doc → client timeout; log shows POST /api/delete-path 200. File is still on disk minutes later.
Expected
The edit is persisted to disk (as on 0.76.1 / 0.77.1), or the tool reports a failure. delete removes the file when it returns 200.
Actual
The live doc and disk diverge silently. The retry error ("Text not found") hides that the change was never saved. delete reports success but does not remove the file.
Log excerpt (.ok/local/logs/server-current.jsonl, one server pid, times UTC)
12:52:52 persistence: [persistence] Wrote ~/Documents/Second Brain/ok-write-test-0.78.0.md (33 bytes)
12:52:52 agent-sessions: [agent-write] applied agent markdown write <- write
12:52:52 shadow-lock: Stale lock detected (pid=46276, host=...) — replacing
12:53:21 agent-sessions: [agent-write] applied agent markdown write <- edit (no "Wrote" after this)
12:53:53 persistence-staleness: sweep complete scanned=1 divergent=1 forced=0 stoodDown=0
12:54:53 persistence-staleness: sweep complete scanned=1 divergent=1 forced=0 stoodDown=0
12:55:53 persistence-staleness: sweep complete scanned=1 divergent=1 forced=0 stoodDown=0
12:56:53 persistence-staleness: sweep complete scanned=1 divergent=1 forced=0 stoodDown=0
12:57:18 http: Text not found in document. <- edit retry
12:57:53 persistence-staleness: sweep complete scanned=1 divergent=1 forced=0 stoodDown=0
12:58:23 agent-sessions: closing all sessions for doc
12:58:53 api: POST /api/delete-path 200 <- delete; file remains on disk
12:58:53 persistence-staleness: sweep complete scanned=0 divergent=0 forced=0 stoodDown=0
Also seen at startup: [agent-presence] __system__ document not found — presence updates will be dropped and [cc1] __system__ document not found at emitDiskAck — dropped.
Notes
Summary
On
0.78.0, an MCPeditis applied to the live document but never written to disk. The server's own staleness sweep detects the divergence every minute but never flushes it (divergent=1, forced=0). A retry of the sameeditthen returnsText not found in document, because the live doc already has the change. A later MCPdeletereturns HTTP 200, but the file stays on disk.The same write → edit → delete round-trip passed on
0.76.1(2026-09-20) and0.77.1(2026-09-22) on the same machine and vault. This looks like a regression in0.78.0.Environment
@inkeep/open-knowledge:0.78.0(npm global, stablelatest)0.77.1Steps
0.78.0(first start after upgrade).write:{ document: { path: "ok-write-test-0.78.0", content: "# OK 0.78.0 write test\n\nline one." } }[persistence] Wrote .../ok-write-test-0.78.0.md (33 bytes)). OK.edit:{ document: { path: "ok-write-test-0.78.0", find: "line one.", replace: "line one, edited." } }[agent-write] applied agent markdown write. No[persistence] Wrotefollows.line one..exec("cat ok-write-test-0.78.0.md")also returnsline one..edit→Error: Text not found in document.deleteof the same doc → client timeout; log showsPOST /api/delete-path 200. File is still on disk minutes later.Expected
The edit is persisted to disk (as on
0.76.1/0.77.1), or the tool reports a failure.deleteremoves the file when it returns 200.Actual
The live doc and disk diverge silently. The retry error ("Text not found") hides that the change was never saved.
deletereports success but does not remove the file.Log excerpt (
.ok/local/logs/server-current.jsonl, one server pid, times UTC)Also seen at startup:
[agent-presence] __system__ document not found — presence updates will be droppedand[cc1] __system__ document not found at emitDiskAck — dropped.Notes
ok start— git block-timeouts are collateral, not the cause #1268 (slow boot on Windows).