Skip to content

apply_patch command generates requests with illegible diff #2005

@nestedlogicsol

Description

@nestedlogicsol

What version of Codex is running?

0.19.0

Which model were you using?

gpt-5

What platform is your computer?

Darwin 25.0.0 arm64 arm

What steps can reproduce the bug?

  1. Fresh install Codex
  2. Login with ChatGPT
  3. Run in sandbox mode (second option)
  4. Ask it to make a random edit to a random file
  5. Observe that:
    • Codex may fail to apply_patch
    • 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.

Image Image

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions