G-12Diff Application Strategies

/coding-agents/diff-application

How an edit actually reaches the file — reprint the whole thing, or emit an anchored block the harness has to match.

Key insight

This is the most consequential mechanism in coding agents and the least discussed. Whole-file rewrites can never fail to apply and can silently delete; anchored edits can fail to apply and never silently delete. Prefer the failure you can see.

Failure mode

Treating a failed match as a bug in the strategy. A no-match is the mechanism doing its job — the file moved, and the right response is to re-read and re-anchor, not to fall back to overwriting.

Elsewhere in the atlas