You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[FEATURE]: port V1 fuzzy edit matching to the V2 edit tool #51706
I have verified this feature I'm about to request hasn't been suggested before.
The V2 edit tool matches oldString with a single literal indexOf scan, so any inexact match fails outright with "Could not find oldString". When a model reproduces oldString from memory and it is only nearly right — trailing whitespace, an indentation slip, an extra blank line — the edit fails, the model re-reads the file, and the call is retried.
V1 already handles these cases with seven lenient strategies, and a TODO in packages/core/src/tool/edit.ts has been tracking the port.
A PR is up that ports them as pure helpers in packages/core/src/tool/edit-match.ts, consulted only after exact matching returns zero, and that also fixes two open bugs in that logic: #41872 and #45199.
Previously requested in #32760, which was auto-closed for not following the issue template.
Activity
github-actions commentedon Sep 27, 2026
This issue might be a duplicate of existing issues. Please check: