Codex Started Failing to Create new PR

Turns out any .gz file breaks codex.

For me I was still tracking the .yarn/ directory which contained a .gz file.

I’d suggest looking for any non-code files and make sure you arent committing anything that can mess GPT up.

Added .yarn/ to git ignore, pushed everything to a brand new repo. Reset my codex environments. Perfect after this.


Same here so guide me step by step

I ran into the same binary files problem. In my case Codex had actually added one binary file (png file, probably it made a copy of my existing file for some reason). Noticed that when reviewed the list of files and diffs.

I asked Codex to remove that file as it should not have been added in the first place. After this it was able to create the pull request.

I sometimes have similar issues, but I do not see you describe it as exactly the same.
The issues I used to get often:

It will say ‘‘update branch’’ in the top right instead of ''create pull request".
Or it will just say create pull request, but when you do it seems to use a old PR.

To avoid these kinds of conflicts I have changed my way of working:
For each issue/update/feature I write using codex I start a new task. After having made 1 PR I make a new one. And I archive the old ones. That way you can also find old PR’s back easy if need be inside codex. Although I do not really see a practical use for that.

So in summary:

  1. Make task
  2. Let it run
  3. Make PR
  4. Close and archive chat after PR is done.
  5. Start at step 1 again.

I got the same issue with a new repo. It’s my first time using Codex. Do we have a solution for this?

Hi @thuongpham,

Any chance you can show me what it says exactly? what the issue is?
See if I am right about understanding the issue.

For the “Binary files are not supported”, another option that worked for me is to:

  • use the “copy git apply” (under the menu of create PR)
  • patch this locally
  • push it your self to a branch

I also point this out in my video on YouTube " Use Codex by OpenAI to Build a .NET + PostgreSQL App in 5 Steps + fix Binary files are not supported" (at 4:23)

2 Likes

Type in the codex chat with problematic PR:

“Detect any binary files in your changes, remove them and add them to .gitignore”

This fixes the issue for me.

2 Likes

this works perfectly! thanks.

1 Like

This worked for me. Thanks.

1 Like

no working at all last 30mins

In my case I initialized a Blazor project, and it was the generated favicon.png that prevented the PR to be created.

So I added in the prompt:

  • The project must not have any favicon, and no binary file.

And after that it worked !

2 Likes

Thanks, I added in the prompt:

  • The project must not have any favicon, and no binary file.

And after that it worked !

Does anyone know why a binary file would prevent Codex from creating the PR?

Is OpenAI working on a fix? Do we know?

TIA

Best so far when you got this problem. is to simply ask to remove the binary files that it created.

“Remove all binary files we have created during this session”

then when has been executed, you can make new PR.

Adding them to the GitIgnore is not always best option.. cause when you make manual changes yourself .. well :wink: so… some are best to have inside your repo.. some not..

Thanks! did this, and added a prompt to add any future binary files you detect to the .git ignore as well. appears to be working a week or so later.