PulseAugur
EN
LIVE 15:42:58

Claude Code Edit Tool Fails on Multi-Line Strings

A bug in Claude Code's Edit tool has been identified where it intermittently fails to find and modify strings that are byte-identical to the file content. This issue, reported on GitHub and reproducible by maintainers, specifically affects multi-line strings and appears to occur when the tool consults a stale view of the file. The problem can lead to wasted computational resources and incorrect agent behavior, as the model operates under the false assumption that a string is not present. AI

IMPACT This bug can lead to wasted tokens and incorrect agent behavior, potentially hindering the reliability of coding assistants.

RANK_REASON Bug report on a specific feature of an AI coding assistant.

Read on dev.to — Claude Code tag →

AI-generated summary · Google Gemini · from 1 sources. How we write summaries →

Claude Code Edit Tool Fails on Multi-Line Strings

COVERAGE [1]

  1. dev.to — Claude Code tag TIER_1 English(EN) · TerminalBlog ·

    Beware: Claude Code's Edit Tool Rejects Strings That Are in the File

    <p>You ask Claude Code to change a few lines. The <code>old_string</code> you give it is copy-pasted from the file. The tool comes back with <code>String not found in file. Failed to apply edit.</code> — and you know for a fact the text is there. You re-read the file, the bytes m…