apply_patch tool
Apply file changes using a structured patch format. This is ideal for multi-file or multi-hunk edits where a singleedit call would be brittle.
The tool accepts a single input string that wraps one or more file operations:
Parameters
input(required): Full patch contents including*** Begin Patchand*** End Patch.
Notes
- Paths are resolved relative to the workspace root.
- Use
*** Move to:within an*** Update File:hunk to rename files. *** End of Filemarks an EOF-only insert when needed.- Experimental and disabled by default. Enable with
tools.exec.applyPatch.enabled. - OpenAI-only (including OpenAI Codex). Optionally gate by model via
tools.exec.applyPatch.allowModels. - Config is only under
tools.exec(notools.bashalias).