ContextArticle
Claude's edit tool is built around search-and-replace, whereas OpenAI's Codex uses an apply_patch mechanism instead, and OpenAI has publicly discussed training its models specifically to use that apply_patch tool well.
The author contrasts Anthropic's search-and-replace edit tool with OpenAI's apply_patch approach for Codex, noting OpenAI has spoken about deliberately training models to use its own patch mechanism. ✦ AI generated
Simon Willison · Simon Willison's Weblog · 2026-07-04 · original ↗
Claude's edit tool uses search and replace. OpenAI's Codex uses an apply_patch mechanism instead, and OpenAI have talked in the past about how their models are trained to use that tool effectively.
Read full article ↗excerpt · fair-use quotation
Around this claim
This moment responds to
provides context → Third-party coding harnesses like Pi may need to implement multiple edit tools so they can use whichever one performs best for the specific underlying model the user has selected.Simon Willison · Simon Willison's Weblogsupports → Newer Anthropic models have been specifically trained, presumably via reinforcement learning, to better use the edit tools baked into Claude Code, and this makes them more likely to misuse the differently-shaped custom edit tools of other coding harnesses like Pi.Armin Ronacher · Simon Willison's Weblog