OpenCode v2 tool patch breaks CRLF line endings on Windows, bug reproduced

Mac-Moneysac · ghdev · 2026-10-12

A reproduced issue in anomalyco/opencode (v2.0.26) reports that the built-in tool patch writes LF line endings into CRLF-formatted files on Windows, corrupting formatting in git repos without normalization and unversioned files. Prior issue #37090 has been reopened since the bug persists in v2; #50740 covers the related tool write case. Reproduction: edit a CRLF file with a model that triggers the patch tool and add a line — the new line comes out LF.

Original post →

More from coding & agent

coding & agent channel →