Skip to content

tweak(edit): separate edit tool error message with clearer guidance to avoid llm doom editing loop #2051

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from

Conversation

spoons-and-mirrors
Copy link
Contributor

@spoons-and-mirrors spoons-and-mirrors commented Aug 18, 2025

Summary

Changing edit tool error message in case of match from:

  • oldString not found in content or was found multiple times

to

  • oldString not found in content
  • oldString found multiple times and requires more code context to uniquely identify the intended match

Should drastically improve edit error handling by the LLM which tend to tunnel vision on the first part of the error (the "not found" part), when the LLM knows it's there, and thus behave like it's a tool error and thinks retrying will make it work.

See it in action

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants