Spokes.wiki Search About
Created
Updated
See also
harness-problem-hashline · oh-my-pi · agentic-coding-harness · claude-code · harness-bench · model-or-harness-taxonomy

Agent edit format

How a coding agent tells the harness which lines of a file to change. It is the narrowest interface in an agentic-coding-harness and, on the evidence assembled so far, one of the largest levers on whether a given model succeeds — a harness-side design choice that shows up in the output as if it were a model capability.

Four designs are in circulation, and no two harnesses in this spoke agree:

Format Who ships it What the model must produce
apply_patch Codex a diff blob in OpenAI's flavour, validated against strict rules rather than a schema
str_replace claude-code, Gemini, most others the exact old text, character for character, unique in the file
Apply model Cursor a rough edit, merged into the file by a separately fine-tuned ~70B model
Hashline [[oh-my-pi omp]]

Why it is a lever and not a detail

Every format except hashline asks the model to reproduce content it has already read. That is a recall task layered on top of the coding task, and it fails independently of whether the model understood the change. str_replace's "String to replace not found in file" is the visible form — common enough in claude-code to carry a GitHub megathread — and a patch blob a model was never trained on fails harder: measured at a 50.7% patch-failure rate for Grok 4 and 46.2% for GLM-4.7.

Hashline's move is to give the model a stable, verifiable identifier instead. Reads come back with each line tagged (2:f1| return "world";) and edits reference the tag. Two consequences: no old content is retyped, which is where the token savings come from; and a hash that no longer matches means the file moved since the read, so a stale edit is rejected before it lands rather than after. That last property is a concurrency check the other formats only approximate.

What the measurements say

The evidence is thin and one side of it is interested. The Harness Problem (T3, author-run) holds the model fixed and varies only the edit tool across 16 models: +15 points average over patch, hashline ahead of patch in 14 of 16, and the weakest models gaining the most — Grok Code Fast 1 from 6.7% to 68.3%. The two strongest models in the set gain little or lose, which is the result that most needs an independent replication and has not had one.

Independent work supports the general claim without endorsing any format. Aider's benchmarks swung GPT-4 Turbo from 26% to 59% on format choice alone. JetBrains' Diff-XYZ (arXiv:2510.12487) found no single edit format dominates across models and use cases. EDIT-Bench (arXiv:2511.04486) found only one model clearing 60% pass@1 on realistic editing tasks. Neither paper is paged in this spoke yet; both are named growth edges.

Where it fits the harness argument

model-or-harness-taxonomy gives the failure a location: a model that understood the change but could not express it is a fault on the model↔tool edge, repairable in the harness and not by post-training. harness-bench measures harness effects at the level of whole harnesses; this is the same effect isolated to one tool, which is why it is the cleanest available demonstration of the spoke's thesis that structure substitutes for capability. The caveat travels with it: the effect is largest where models are weakest, so a lever measured in early 2026 may shrink as models absorb the formats.

harness-problem-hashline · oh-my-pi · agentic-coding-harness · claude-code · harness-bench · model-or-harness-taxonomy · claw-swe-bench · agent-evals