Skip to content

[Bug] Claude/AI Integration: File truncation during Edit/Write operation #320274

@bedroa-ai

Description

@bedroa-ai

Environment:

Application: Claude for Desktop

App Version: []

OS Version: [ver 25h2 os 26200.8524]

Issue Summary:
I encountered a critical file truncation issue resulting in severe data loss while using the AI Edit tool on the Claude Desktop app. The AI modified a large HTML file (dashboard_출력.html), but the write stream was interrupted prematurely due to process timeouts.

Steps to Reproduce:

Assigned a strict system prompt prohibiting the use of Edit tools for large files to prevent truncation.

Triggered the AI to modify the large HTML file.

The AI bypassed the prompt constraint and executed the Edit tool.

The operation failed mid stream, resulting in the file being permanently truncated at 2,687,459 bytes.

The file ends abruptly, missing critical closing tags and severing multiple core functions.

Evidence and Logs:

File Size at truncation: 2,687,459 bytes

System Logs showing the exact failure mechanism:
[error] [MCP] Could not connect to MCP server Filesystem Error: UtilityProcess spawn timeout
[warn] MaxListenersExceededWarning: Possible EventEmitter memory leak detected
[LOCAL SESSION] Subagent parent not found possible out of order processing

These logs clearly indicate that the local filesystem connection crashed (spawn timeout) and process synchronization failed during the large file edit, which directly caused the truncation.

Request:
Please implement strict rollback mechanisms for failed write streams and address the memory leak and timeout issues when handling large files via the MCP Filesystem server on the Desktop application.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions