[Bug] Claude/AI Integration: File truncation during Edit/Write operation
@sandy081 is already working on this.
Since Jun 7, 2026.
Assessment
This issue has not been assessed yet.
Description
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.
- Dominant language
- TypeScript
- Stars
- 193k
- Forks
- 42.9k
- PR merge metrics
- PR metrics pending
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from microsoft/vscode
-
testplan-item
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
new release
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
testplan-item
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
testplan-item
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
All issues in microsoft/vscode
Similar issues
-
clawsweeper:fix-shape-clear clawsweeper:queueable-fix clawsweeper:source-repro impact:ux-friction issue-rating: 🦞 diamond lobster no-stale P3
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
Difficulty 1/5 Under an hour Newbie friendliness 76/100
-
code-quality refactoring
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
github/gh-aw-firewall#8816 ·
-
integration:quickjs org:external priority:backlog topic:code-interpreter topic:middleware type:feature
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
langchain-ai/deepagents#6450 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
vercel/react-tweet#225 ·