claude-code - 💡(How to fix) Fix [BUG] MCP edit_file $-stripping regression after latest Claude Desktop update [1 comments, 1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#52014Fetched 2026-04-23 07:38:51
View on GitHub
Comments
1
Participants
1
Timeline
6
Reactions
0
Timeline (top)
labeled ×3unsubscribed ×2commented ×1

Error Message

Error observed: "The $-stripping is new behavior"

Error Messages/Logs

Error observed: Tool fails with $-stripping error Error observed: Tool fails with $-stripping error

Fix Action

Fix / Workaround

Issue: The edit_file MCP tool is stripping $ characters after today's app update, breaking targeted file edits in active filesystem MCP sessions. Error observed: "The $-stripping is new behavior" Impact: The tool is falling back to reading files via bash, checking allowed directories, and rewriting entire files through write_file instead of making targeted edits. Each operation requires multiple extra steps burning significantly more tokens per file operation. Workaround in use: Single write_file preferred over edit_file. If edit_file unavoidable, hex-escape $ as \x24. User impact: Max plan subscriber running long-running research workflows with frequent file updates. Token overhead from workaround is substantial and ongoing.

MCP should be working as normal it only changed after this last update and its having to create workarounds as stated in the bug description.

Observed behavior: Tool falls back to reading files via bash, checking allowed directories, then rewriting entire files through write_file instead of making targeted edits. Multiple extra steps required per operation. Expected behavior: edit_file should make targeted edits without stripping $ characters. Workaround: Use single write_file instead of edit_file. If edit_file unavoidable, hex-escape $ as \x24. Impact: Significant token overhead — full file rewrites instead of targeted edits. Ongoing cost impact for Max plan subscribers running long-running workflows with frequent file updates. Additional note: The /feedback command in the Claude Desktop app is also not working.

Code Example

Description of bug:
After the Claude Desktop app update on April 22, 2026, the MCP edit_file tool is stripping $ characters, breaking targeted file edits in active filesystem MCP sessions.
Error observed:
"The $-stripping is new behavior"
Steps to reproduce:

Connect filesystem MCP to a local folder
Run a task that requires edit_file with any $ character in the content
Tool fails with $-stripping error

Observed behavior:
Tool falls back to reading files via bash, checking allowed directories, then rewriting entire files through write_file instead of making targeted edits. Multiple extra steps required per operation.
Expected behavior:
edit_file should make targeted edits without stripping $ characters.
Workaround:
Use single write_file instead of edit_file. If edit_file unavoidable, hex-escape $ as \x24.
Impact:
Significant token overhead — full file rewrites instead of targeted edits. Ongoing cost impact for Max plan subscribers running long-running workflows with frequent file updates.
Additional note:
The /feedback command in the Claude Desktop app is also not working.
RAW_BUFFERClick to expand / collapse

Preflight Checklist

  • I have searched existing issues and this hasn't been reported yet
  • This is a single bug report (please file separate reports for different bugs)
  • I am using the latest version of Claude Code

What's Wrong?

Issue: The edit_file MCP tool is stripping $ characters after today's app update, breaking targeted file edits in active filesystem MCP sessions. Error observed: "The $-stripping is new behavior" Impact: The tool is falling back to reading files via bash, checking allowed directories, and rewriting entire files through write_file instead of making targeted edits. Each operation requires multiple extra steps burning significantly more tokens per file operation. Workaround in use: Single write_file preferred over edit_file. If edit_file unavoidable, hex-escape $ as \x24. User impact: Max plan subscriber running long-running research workflows with frequent file updates. Token overhead from workaround is substantial and ongoing.

What Should Happen?

MCP should be working as normal it only changed after this last update and its having to create workarounds as stated in the bug description.

Ta Chad

Error Messages/Logs

Description of bug:
After the Claude Desktop app update on April 22, 2026, the MCP edit_file tool is stripping $ characters, breaking targeted file edits in active filesystem MCP sessions.
Error observed:
"The $-stripping is new behavior"
Steps to reproduce:

Connect filesystem MCP to a local folder
Run a task that requires edit_file with any $ character in the content
Tool fails with $-stripping error

Observed behavior:
Tool falls back to reading files via bash, checking allowed directories, then rewriting entire files through write_file instead of making targeted edits. Multiple extra steps required per operation.
Expected behavior:
edit_file should make targeted edits without stripping $ characters.
Workaround:
Use single write_file instead of edit_file. If edit_file unavoidable, hex-escape $ as \x24.
Impact:
Significant token overhead — full file rewrites instead of targeted edits. Ongoing cost impact for Max plan subscribers running long-running workflows with frequent file updates.
Additional note:
The /feedback command in the Claude Desktop app is also not working.

Steps to Reproduce

Description of bug: After the Claude Desktop app update on April 22, 2026, the MCP edit_file tool is stripping $ characters, breaking targeted file edits in active filesystem MCP sessions. Error observed: "The $-stripping is new behavior" Steps to reproduce:

Connect filesystem MCP to a local folder Run a task that requires edit_file with any $ character in the content Tool fails with $-stripping error

Observed behavior: Tool falls back to reading files via bash, checking allowed directories, then rewriting entire files through write_file instead of making targeted edits. Multiple extra steps required per operation. Expected behavior: edit_file should make targeted edits without stripping $ characters. Workaround: Use single write_file instead of edit_file. If edit_file unavoidable, hex-escape $ as \x24. Impact: Significant token overhead — full file rewrites instead of targeted edits. Ongoing cost impact for Max plan subscribers running long-running workflows with frequent file updates. Additional note: The /feedback command in the Claude Desktop app is also not working.

Claude Model

Sonnet (default)

Is this a regression?

Yes, this worked in a previous version

Last Working Version

No response

Claude Code Version

Claude 1.3883.0 (93ff6c) 2026-04-21T17:24:01.000Z

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Terminal.app (macOS)

Additional Information

No response

extent analysis

TL;DR

The most likely fix is to update the MCP edit_file tool to properly handle $ characters, potentially by escaping or quoting them, to prevent stripping and allow targeted file edits.

Guidance

  • Verify that the issue is indeed caused by the recent Claude Desktop app update by checking the changelog for any changes related to the MCP edit_file tool or $ character handling.
  • Test the workaround of using single write_file instead of edit_file, or hex-escaping $ as \x24, to mitigate the token overhead and cost impact.
  • Investigate the /feedback command issue in the Claude Desktop app, as it may be related to the same underlying problem.
  • Consider reaching out to the development team or support for further assistance, as this is a regression and the user is experiencing significant impact.

Example

No code snippet is provided, as the issue is more related to the tool's behavior and configuration.

Notes

The issue seems to be specific to the Claude Desktop app update on April 22, 2026, and the user is using the latest version of Claude Code. The /feedback command issue may be a separate problem, but it's worth investigating as it could be related.

Recommendation

Apply the workaround of using single write_file instead of edit_file, or hex-escaping $ as \x24, until a proper fix is available, as this will help mitigate the token overhead and cost impact.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING