They're literally using diff/patch under the covers, at least the setup i'm currently using.

Did you get them working with diff syntax? I couldn't figure it out, so I just tried a bunch of agentic programs, found a few that actually worked, and it turned out they all use search/replace strings. There's probably other ways to do it but it seems basically everyone settled on that.

I've been trying that with smaller models and had to make some adjustments (e.g. they all really wanted to include the filename twice). So I just make a small tweak and bam suddenly I can edit code with small fast cheap models.