fix: Add apply_patch to EDIT_TOOLS filter#18009
Merged
rekram1-node merged 1 commit intoanomalyco:devfrom Mar 18, 2026
Merged
Conversation
1b6f72c to
984c29d
Compare
The tool is named apply_patch, not patch. Updating EDIT_TOOLS to use the correct tool name so it gets filtered properly in plan mode.
984c29d to
96ad868
Compare
3 tasks
AbhishekChorotiya
pushed a commit
to AbhishekChorotiya/opencode
that referenced
this pull request
Mar 19, 2026
AvatarGanymede
pushed a commit
to AvatarGanymede/opencode-dev
that referenced
this pull request
Mar 19, 2026
demostanis
pushed a commit
to demostanis/opencode
that referenced
this pull request
Mar 19, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue for this PR
Closes #18008
Type of change
What does this PR do?
The apply_patch tool was not being filtered in plan mode because the EDIT_TOOLS array used the old name 'patch' instead of 'apply_patch'. Adding 'apply_patch' ensures it's properly filtered when models are in plan mode.
Additionally, this removes references to the deprecated/obsolete
patchtool in the same locations and updates the CI test to use the currentapply_patchtool name.Credit to Carlo Wood on the OC Discord for discovering the underlying issue!
How did you verify your code works?
bun test,bun typecheck, admittedly could not test behaviour completely, as I do not have access to the GPT models.Checklist