Codex 0.162 preserves CRLF when agents edit files
Codex CLI 0.162 now keeps existing CRLF line endings in apply_patch updates by default, where it previously normalized them to LF. The same issue hit Claude Code, whose Edit and Write tools turned a one-line change into a whole-file diff.
- Codex 0.162 preserves CRLF in apply_patch without an opt-in
- Switching CRLF to LF turns a one-line edit into a whole-file diff
- Claude Code fixed line-ending conversion in 2.1.77 and 2.1.89
- git ls-files --eol and --ignore-cr-at-eol help diagnose the issue
Read next
Software