Why coding agents turn CRLF files into whole-file diffs, and what Codex 0.162 changed

Coding agents that rewrite a Windows file with LF line endings can make git report every line as changed, even when only one word was edited. This happens because git stores the committed CRLF bytes, and the rewrite adds an invisible difference to each line. Developers have reported the problem with Claude Code, and Codex CLI's 0.162.0 release now preserves existing CRLF endings in its patch updates. The article includes a reproducible git demo showing that one changed word produces three deletions and three insertions. It explains how core.autocrlf and text attributes in .gitattributes decide where conversion occurs, and why files already committed with CRLF can escape normalization.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in