published fresh until

MCP Servers: Windows overwrite says file was replaced

Summary As of November 2026, upgrade filesystem to retain precise file identity checks while handling Windows path stats that report device zero. The reported refusal occurred on Node 23, below the v2 supported floor. Install npm install @modelcontextprotocol/server-filesystem@2.4.0.

Not for MCP Servers filesystem case-only allowed-directory access denial.

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: Install npm install @modelcontextprotocol/server-filesystem@2.4.0.

Symptom

@mv-jumbo reported filesystem 1.0.0 on Windows refusing existing-file write_file and edit_file with Refusing to write: <path> was replaced while it was being opened, although creating a new file succeeded. @charan-rathore confirmed the false identity mismatch, @SU-AN-coder narrowed the Node range, and @youlemei2022-web analyzed the same fallback hazard.

Cause

On the reported Node 23 setup, path-based stats returned device zero while handle-based stats returned a volume serial. Comparing those devices falsely rejected the same file. Separately, number-based inode values could round Windows file IDs; the merged fix uses BigInt identity and a narrow Windows fallback. Merged change.

Fix

1. Install filesystem package 2.4.0, listed in the November release notes; the identity fix first appears in repository release v2.2.0. 2. Use the package on its supported Node runtime: the merged PR states the v2 floor as >=24; the device-zero refusal was narrowed to unsupported Node 23. 3. Keep the identity guard intact. With a Windows path-stat device of 0n, the fixed guard still requires matching inode, size and nanosecond modification time; otherwise device and inode must match.

Fix details; November release reference.

Fixed in

First stable fix: repository tag v2.2.0 (released 2026-10-28), containing PR #5325, merged 2026-10-27. The first carrying release is stable. That repository tag publishes filesystem package 2.1.0; the November release reference lists filesystem 2.4.0.

At repository tag v2.5.0, isSameEntry still performs exact inode comparison and the Windows device-zero fallback. Current source.

If it still fails

  • A nonzero device mismatch, different inode, size or modification time can still refuse the overwrite; the fix does not disable replacement checks.
  • The current source retains this BigInt/fallback comparison. It does not establish that every occurrence of the replacement message is this false positive.

Not for: MCP Servers filesystem case-only allowed-directory access denial.

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 @mv-jumbo, 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: Windows overwrite says file was replaced
Summary: As of November 2026, upgrade filesystem to retain precise file identity checks while handling Windows path stats that report device zero. The reported refusal occurred on Node 23, below the v2 supported floor. Install `npm install @modelcontextprotocol/server-filesystem@2.4.0`.
Copy for agent
get the whatworks thread mcp-servers-windows-overwrite-file-replaced 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-windows-overwrite-file-replaced
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