published fresh until

MCP Servers: shared memory file silently loses writes

Summary As of November 2026, upgrade server-memory so a file lock serializes each cross-process read, mutation and save. Keep the memory directory writable and use a filesystem honoring exclusive file creation. Use @modelcontextprotocol/server-memory 2.2.1.

Not for MCP Servers filesystem write_file or edit_file overwrite refusals.

For your agent
claude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp

Read-only, no account. Sign-in is only for trial reports: /connect.md

What this thread does

Do first: Upgrade @modelcontextprotocol/server-memory to 2.2.1.

Symptom

@daichiyasunami-vottia reported silent lost graph mutations when two server processes shared MEMORY_FILE_PATH: every call could report success while one process's changes disappeared. No error message was emitted. @CryoThrust confirmed the queue's per-process scope; @sattyamjjain discussed the same shared-write hazard and @John-Rood supplied a one-writer workaround in the thread.

Cause

The mutation queue serialized only one process's operations. Two processes could load the same snapshot independently; the later atomic rename then replaced the first process's saved changes. The fix holds an exclusive adjacent lock file across the entire load, mutation and save. Merged change.

Fix

1. Upgrade server-memory to package 2.2.1, listed in repository release v2.5.0; the cross-process fix first shipped in repository tag v1.0.0. 2. Keep the directory containing MEMORY_FILE_PATH writable so the server can create its adjacent <memory file>.lock and perform atomic saves. 3. Use storage that honors exclusive file creation. Each write then re-reads the graph while holding the lock.

Fix details; November release reference.

Fixed in

First stable fix: repository tag v1.0.0 (released 2026-10-11), containing PR #5037, merged 2026-10-05. The first carrying release is stable. if you cannot upgrade: @John-Rood's issue comment recommends a separate MEMORY_FILE_PATH for each client so each file has one writer; those files are separate graphs.

The memory README at v2.5.0 still specifies cross-process locking, its writable-directory requirement and the 60-second wait bound. Current source.

If it still fails

  • A writer that cannot obtain the lock within 60 seconds returns a tool error. Reads do not take this lock.
  • A network filesystem that does not honor exclusive creation cannot safely share a graph this way.
  • Current documentation describes automatic crash recovery and lock release at normal shutdown; the whole file is still rewritten for every mutation.

Not for: MCP Servers filesystem write_file or edit_file overwrite refusals.

Sources

Checked

2026-11-24; read the issue and its comment API records, merged PR API record, fix release API record, v2.5.0 release API record and the tagged source pages listed above; no command was run.

Started from a post by @daichiyasunami-vottia, packaged by the editor. Original post

Subjects

More in github

For agents

Copy a short instruction for an agent that has WhatWorks connected, or open this page as Markdown.

# MCP Servers: shared memory file silently loses writes
Summary: As of November 2026, upgrade server-memory so a file lock serializes each cross-process read, mutation and save. Keep the memory directory writable and use a filesystem honoring exclusive file creation. Use `@modelcontextprotocol/server-memory` `2.2.1`.
Copy for agent
get the whatworks thread mcp-servers-memory-shared-file-loses-writes and help me try it

Follow this thread

Following tells you when the verdict changes, a new version ships or a new option is added. Your agent mentions it the next time you ask WhatWorks.

Sign in with GitHub to follow. Nothing is posted for you.

Sign in with GitHub

Or ask your agent
follow the whatworks thread mcp-servers-memory-shared-file-loses-writes
WhatWorks

Connect your agent MCP

Paste this into your agent

Connect me to WhatWorks: add https://whatworks.dev/mcp/login and sign me in so I have an account. Steps: https://whatworks.dev/connect.md.

Or run this in your terminal
  • Claude Codeclaude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp/login && claude mcp login whatworks
  • Codexcodex mcp add whatworks --url https://whatworks.dev/mcp/login && codex mcp login whatworks