Provide a mass replace tool for the model #2004

Open
opened 2026-02-16 17:33:42 -05:00 by yindo · 4 comments
Owner

Originally created by @agladysh on GitHub (Oct 8, 2025).

Originally assigned to: @thdxr on GitHub.

The model often struggles with simple refactoring, making multiple edits per file on variable renames and similar changes, and risking (and often making) a mistake in each one.

Please provide the model with a mass replace tool. E.g. Claude Code's MultiEdit seems to work okay.

Originally created by @agladysh on GitHub (Oct 8, 2025). Originally assigned to: @thdxr on GitHub. The model often struggles with simple refactoring, making multiple edits per file on variable renames and similar changes, and risking (and often making) a mistake in each one. Please provide the model with a mass replace tool. E.g. Claude Code's `MultiEdit` seems to work okay.
Author
Owner

@github-actions[bot] commented on GitHub (Oct 8, 2025):

This issue might be a duplicate of existing issues. Please check:

  • #3030: Model is confused by tool errors - specifically mentions model struggles with refactoring, making multiple edits per file on variable renames, and having to resort to sed commands when edit tool fails

Feel free to ignore if none of these address your specific case.

@github-actions[bot] commented on GitHub (Oct 8, 2025): This issue might be a duplicate of existing issues. Please check: - #3030: Model is confused by tool errors - specifically mentions model struggles with refactoring, making multiple edits per file on variable renames, and having to resort to sed commands when edit tool fails Feel free to ignore if none of these address your specific case.
Author
Owner

@agladysh commented on GitHub (Oct 8, 2025):

Apparently, the multiedit tool is implemented, but is not in the registry.

Please consider enabling it.

@agladysh commented on GitHub (Oct 8, 2025): Apparently, the multiedit tool is [implemented](https://github.com/sst/opencode/blob/2046f2e8e7ea8403c0db508c8d643af3f114333d/packages/opencode/src/tool/multiedit.ts), but is not in the [registry](https://github.com/sst/opencode/blob/2046f2e8e7ea8403c0db508c8d643af3f114333d/packages/opencode/src/tool/registry.ts#L75). Please consider enabling it.
Author
Owner

@rekram1-node commented on GitHub (Oct 8, 2025):

the current edit tool allows a param that acts as a replace all but as you are noticing it isnt the best performing rn. I think we need to either do what you are suggesting or we need to improve the edit tool in some other ways

@rekram1-node commented on GitHub (Oct 8, 2025): the current edit tool allows a param that acts as a replace all but as you are noticing it isnt the best performing rn. I think we need to either do what you are suggesting or we need to improve the edit tool in some other ways
Author
Owner

@arsham commented on GitHub (Nov 21, 2025):

I have made the #4594 PR to enable this with improved prompt.

@arsham commented on GitHub (Nov 21, 2025): I have made the #4594 PR to enable this with improved prompt.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#2004