You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
apply_patch command generates requests with illegible diff #2005
The apply_patch command lacks a proper diff—raw file content is injected instead
What is the expected behavior?
The expected behavior is that I receive a legible diff to approve.
What do you see instead?
Codex attempts to run the patch command option through the terminal, producing an illegible diff, instead of using tools available to itself and asking for approval.
Additional information
I could be assuming the correct behavior, but I seem to remember this not being a problem before the sandbox prompt added recently.
changed the title [-]Title: `apply_patch` command generates malformed requests with no visible diff[/-][+]Title: `apply_patch` command generates malformed requests with illegible diff[/+]on Aug 8, 2025
changed the title [-]Title: `apply_patch` command generates malformed requests with illegible diff[/-][+]Title: `apply_patch` command generates requests with illegible diff[/+]on Aug 8, 2025
changed the title [-]Title: `apply_patch` command generates requests with illegible diff[/-][+]`apply_patch` command generates requests with illegible diff[/+]on Aug 8, 2025
@gpeal It looks like there are still related issues with the approval workflow (#4940, #4892). The "Don't Trust" option isn't applying the approval policy correctly. Opened PR #4941 to address this, would appreciate a review when you get a chance.
Activity
[-]Title: `apply_patch` command generates malformed requests with no visible diff[/-][+]Title: `apply_patch` command generates malformed requests with illegible diff[/+][-]Title: `apply_patch` command generates malformed requests with illegible diff[/-][+]Title: `apply_patch` command generates requests with illegible diff[/+][-]Title: `apply_patch` command generates requests with illegible diff[/-][+]`apply_patch` command generates requests with illegible diff[/+]overthetop commentedon Aug 9, 2025
This makes the codex cli impossible to use...I can't track any changes it makes
cthacker commentedon Aug 15, 2025
I also have this issue running on mac. Basically every patch I only get a proper diff AFTER it is approved
cthacker commentedon Aug 16, 2025
0.22.0 seems to actually fix this now
gpeal commentedon Aug 24, 2025
This should be fixed now. Feel free to reopen if there is still an issue.
vmotta8 commentedon Oct 8, 2025
@gpeal It looks like there are still related issues with the approval workflow (#4940, #4892). The "Don't Trust" option isn't applying the approval policy correctly. Opened PR #4941 to address this, would appreciate a review when you get a chance.