Skip to content

fix: Add apply_patch to EDIT_TOOLS filter#18009

Merged
rekram1-node merged 1 commit intoanomalyco:devfrom
ariane-emory:fix/filter-apply_patch-tool
Mar 18, 2026
Merged

fix: Add apply_patch to EDIT_TOOLS filter#18009
rekram1-node merged 1 commit intoanomalyco:devfrom
ariane-emory:fix/filter-apply_patch-tool

Conversation

@ariane-emory
Copy link
Contributor

@ariane-emory ariane-emory commented Mar 17, 2026

Issue for this PR

Closes #18008

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

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 patch tool in the same locations and updates the CI test to use the current apply_patch tool 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

  • I have tested my changes locally (to the degree possible for me, see above note)
  • I have not included unrelated changes in this PR

@ariane-emory ariane-emory marked this pull request as ready for review March 17, 2026 23:40
@ariane-emory ariane-emory marked this pull request as draft March 17, 2026 23:50
@ariane-emory ariane-emory force-pushed the fix/filter-apply_patch-tool branch 2 times, most recently from 1b6f72c to 984c29d Compare March 18, 2026 00:02
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.
@ariane-emory ariane-emory force-pushed the fix/filter-apply_patch-tool branch from 984c29d to 96ad868 Compare March 18, 2026 00:13
@ariane-emory ariane-emory marked this pull request as ready for review March 18, 2026 00:30
@rekram1-node rekram1-node merged commit 4b4dd2b into anomalyco:dev Mar 18, 2026
19 of 20 checks passed
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

plan agents ought not have access to the apply_patch tool.

2 participants