Skip to content

Build1 publisher3 min readPublished

Deep Agents now swaps in apply_patch the moment you name a Codex model

LangChain's new harness profiles set prompts, tool implementations and tool names per model family. The company measures a 10 to 20 point gain on a tau2-bench subset it curated from tasks frontier models have not saturated.

The Engineer · Build desk

Illustration accompanying Deep Agents now swaps in apply_patch the moment you name a Codex model

What happened

  • LangChain added harness profiles to deepagents, letting prompts, tools and middleware vary per model, with profiles for OpenAI, Anthropic and Google models shipping by default.
  • LangChain reports that the shipped profiles produce a 10 to 20 point jump on a subset of tau2-bench compared with the default harness.
  • The profile is chosen from the model string passed to create_deep_agent, so it applies without any further configuration from the builder.
  • LangChain cites Terminal-Bench 2.0, where the Claude Code harness ranks last among the Opus 4.6 submissions, as its cleanest public evidence that harness choice moves scores.

Compiled by The EngineerSomething wrong?How this is made

Why it matters

  • cost Anyone running one prompt and one tool schema across model families has been giving up accuracy for it, and LangChain has now put a number on how much.
  • constraint Moving an agent between families becomes a porting job on tool names and prompt blocks, so the model string stops behaving like a swappable config value.
  • decision Teams have to decide whether to pin the deepagents version, since an upgrade can change prompt text and tool names underneath code that did not change.
  • precedent If harness edits alone are worth double-digit benchmark points, a leaderboard comparison has to name the harness before it says anything about the model.

A profile is selected by the model string. Pass `model="google_genai:gemini-3.1-pro-preview"` into `create_deep_agent` and the matching profile applies with no other configuration [12]. What gets applied is more than prompt text. On Codex models the profile replaces the default `edit_file` implementation with `apply_patch` and aliases the `execute` tool as `shell_command` [5]. Both names come from OpenAI's Codex Prompting Guide, which LangChain says prescribes tool implementations and names that improve scores on those models [6].

So a tool name here is part of the interface the model was tuned against. The prompt edits are the more familiar half. For Codex, LangChain added batching instructions: "Before any tool call, decide ALL files and resources you will need. Batch reads, searches, and other independent operations into parallel tool calls instead of issuing them one at a time." [10] For Opus the changes were prompting only, aimed at tool usage and planning, including the line "Active investigation with tools is the default mode of working, not a fallback." [11]

The 10 to 20 point figure comes from a curated subset of tau2-bench, which covers multi-turn tool use and instruction following [3][4]. LangChain says it picked harder tasks that frontier models have not yet saturated, so that harness-level changes would show up [4]. For that margin to transfer, your workload would have to be multi-turn and tool-heavy, and it would have to sit in the band where the model still fails often enough to leave headroom. On tasks a model already passes, a prompt block has nothing to recover. The post gives the range without per-model scores or the size of the subset [17].

A second figure from LangChain's earlier harness work is easier to check. It took `gpt-5.2-codex` from 52.8% to 66.5% on Terminal-Bench 2.0 using prompt and middleware-hook changes, moving the submission from Top 30 to Top 5 at the time of publishing [8]. The gain is 13.7 points [9], inside the range now claimed for profiles, though on a different benchmark and a single model. LangChain also points at the Opus 4.6 submissions on Terminal-Bench 2.0, where the Claude Code harness ranks last [7]. The model's own vendor holding the bottom slot for it is the strongest version of the argument.

Automatic application is convenient, and it has a consequence for anyone who reads traces. One source file pointed at two model families now emits different tool names, so a test or a dashboard that asserts on `execute` will not find it under a Codex profile [5][12]. Prompt text also becomes a dependency of the package version. LangChain says the default profiles can be inspected in the repo, and that builders can register their own [15].

The post's own framing is blunt: "A single harness can't be optimal for every model" [13]. Its stated takeaway is narrower than the benchmark number, calling the per-model interface "a helpful primitive for builders to manage profiles per agent, version them, and easily test differences in configurations" [16].

What to watch

  • Whether LangChain publishes per-model tau2-bench scores and the task list for the curated subset.
  • Whether profiles get versioned per model revision, given that the Opus 4.6 to 4.7 migration guide flags prompt-level changes worth making.
  • Whether profiles appear for model families outside the OpenAI, Anthropic and Google set that ships by default.
Loading claim ledger
Loading source directory links
Loading share composer
Loading topic controls
Loading related stories