opencode icon indicating copy to clipboard operation
opencode copied to clipboard

fix(edit): add per-file lock to prevent read-before-write race

Open spoons-and-mirrors opened this issue 2 months ago • 2 comments

what the title says. didn't wrap write.ts and patch.ts with withLock because it doesn't really make sense, but... should I for consistency?

This fixes the read before edit error we got when doing parallel edit calls (reliably?)

Resolves https://github.com/sst/opencode/issues/2882

spoons-and-mirrors avatar Nov 16 '25 21:11 spoons-and-mirrors

/review

rekram1-node avatar Dec 05 '25 06:12 rekram1-node