codex - 💡(How to fix) Fix Ignore whitespace-only changes in edited-file summaries [1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openai/codex#21009Fetched 2026-05-05 05:54:34
View on GitHub
Comments
0
Participants
1
Timeline
5
Reactions
0
Author
Participants
Timeline (top)
labeled ×3renamed ×1unlabeled ×1

Code Example

Edited path/to/file (+39 -36)

---

git diff -w --ignore-blank-lines -- path/to/file
RAW_BUFFERClick to expand / collapse

What version of Codex CLI is running?

codex-cli 0.128.0

What subscription do you have?

ChatGPT Business

Which model were you using?

gpt-5.5

What platform is your computer?

Darwin 25.4.0 arm64 arm

What terminal emulator and version are you using (if applicable)?

Terminal.app

What issue are you seeing?

The automatic Edited file (+N -N) summary can be hard to review when a small code change causes a formatter to re-indent a larger block.

For example, a real change may only add one option or argument to a function call, but the formatter then shifts the indentation of the whole nested block. Codex shows that as a large edit, even though most changed lines only changed whitespace.

The meaningful change was one added option, but Codex showed something like:

Edited path/to/file (+39 -36)

Running Git with whitespace ignored made the real change clear:

git diff -w --ignore-blank-lines -- path/to/file

What steps can reproduce the bug?

  1. Start with code where a function call contains a multi-line nested block.
  2. Ask Codex to add a small option or argument to that outer call.
  3. Run the project formatter, or let Codex run it.
  4. Look at the automatic Codex edited-file summary.

If the formatter re-indents the nested block, Codex shows many removed and added lines even though most of them only changed indentation.

What is the expected behavior?

Codex should collapse or downplay whitespace-only changes in edited-file summaries, while still making the full raw diff available.

Additional information

Related: #17528, which reports unreadable Codex diffs where unchanged lines appear as changed.

extent analysis

TL;DR

Consider using git diff -w to ignore whitespace changes when reviewing Codex edited-file summaries.

Guidance

  • The issue is likely caused by the formatter re-indenting a larger block of code, resulting in a large number of changed lines being reported by Codex.
  • To verify the actual change, run git diff -w --ignore-blank-lines -- path/to/file to ignore whitespace changes.
  • To mitigate this issue, consider configuring Codex to collapse or downplay whitespace-only changes in edited-file summaries.
  • Review related issue #17528 for potential solutions to similar problems with Codex diffs.

Example

No code snippet is provided as the issue is more related to configuration and usage of Codex and Git.

Notes

This workaround may not be directly applicable to all use cases, and a more permanent solution may require changes to Codex's configuration or behavior.

Recommendation

Apply workaround: use git diff -w to ignore whitespace changes when reviewing Codex edited-file summaries, as it provides a more accurate representation of the actual code changes.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

codex - 💡(How to fix) Fix Ignore whitespace-only changes in edited-file summaries [1 participants]