codex icon indicating copy to clipboard operation
codex copied to clipboard

Allow PRs with binary files

Open FreddyE1982 opened this issue 1 year ago • 30 comments

Please allow codex web to create PRs that include binary files. I just had it work successfully on a task for 40 minutes and can not merge the PR because it accidentely created a small unneeded binary file!

FreddyE1982 avatar Oct 07 '25 06:10 FreddyE1982

Same here, or at least, let us delete the binary and create PR. It is so annoying to loose all work due to this error.

alex-santafe avatar Oct 11 '25 05:10 alex-santafe

same here.

sayedalimousawi avatar Oct 11 '25 11:10 sayedalimousawi

I was just getting into Codex and then found out about this limitation. So frustrating! Does Claude Code have this problem? Might be a reason to switch.

selfinterest avatar Oct 11 '25 22:10 selfinterest

yes this needs to be fixed please

Zejzz avatar Oct 13 '25 08:10 Zejzz

It has been like this since launch - makes it not really usable for some workflows.

Workaround is .gitignore common binary files.

shanelindsay avatar Oct 13 '25 09:10 shanelindsay

same here. it needs to be fixed i am having issues creating a PR!

Nicholas-Tritsaris avatar Nov 14 '25 02:11 Nicholas-Tritsaris

Yeah it's impossible to e.g. create a bun lockfile (bun.lockb) or create a PR for a codex change that inclues such a change this way -- not sure I understand the intent here -- shouldnt you be able to "allowlist" such changes at least (e.g. bun.lockb files are ok to commit)?

z0d14c avatar Nov 14 '25 23:11 z0d14c

Hit the same issue, I think it is pretty common use case and surprised that it is not fixed yet.

yanguowen avatar Nov 18 '25 05:11 yanguowen

This is the same for me. You have to exclude everytime the binary files or find a workaround with those files ... It's literally painful.

MotherSphere avatar Nov 23 '25 15:11 MotherSphere

Same for me - Gradle wrapper jar is automatically added to the build and cannot be committed to the repo. Just add the possibility to exclude specific files from the PR to avoid messing up with workarounds.

vp-mazekine avatar Dec 04 '25 14:12 vp-mazekine

Partial workaround is to use "copy git apply". The below post says to paste to a .patch file, then run git apply ThatFile.patch, but I think what's copied is the commands to run themselves, with data included.

https://community.openai.com/t/codex-started-failing-to-create-new-pr/1264529/40

jmegner avatar Dec 11 '25 03:12 jmegner

I was recently able to create a PR with a binary bun lock file, so maybe this is fixed?

z0d14c avatar Dec 23 '25 06:12 z0d14c

Just tried with a .png , still get binary files not supported error. Sad.

On Tue, 23 Dec 2025, 06:09 Thomas Grice, @.***> wrote:

z0d14c left a comment (openai/codex#4867) https://github.com/openai/codex/issues/4867#issuecomment-3685270646

I was recently able to create a PR with a binary bun lock file, so maybe this is fixed?

— Reply to this email directly, view it on GitHub https://github.com/openai/codex/issues/4867#issuecomment-3685270646, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAVKQFBCBIQ2M63RZUM3INT4DDMDNAVCNFSM6AAAAACIPJDCGCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTMOBVGI3TANRUGY . You are receiving this because you commented.Message ID: @.***>

shanelindsay avatar Dec 23 '25 07:12 shanelindsay

When this happens you can ask codex to remove the offending binary file and you will be able to create the PR without issues. Then you manually add the file in the PR itself if you need it.

ascillato avatar Dec 30 '25 05:12 ascillato

G

anowardear062-svg avatar Dec 30 '25 06:12 anowardear062-svg

My PR was about adding some QR codes to a website, it worked out and generated static images of the QR code (which is what I asked), but then it causes the same error when I try create the PR :/

mrgreenh avatar Jan 12 '26 18:01 mrgreenh

Same here. One case is when you are asking CodeX to compile a binary from a repo with very complex environment & system requirements, and the compilation was finally successful, then the security mechanism blocks it. In this case we do expect PRs to include binaries.

hatsune-miku avatar Jan 13 '26 04:01 hatsune-miku

I uploaded screenshots in the codex web UI and asked it to add them and update my README with them, but it fails at update-branch because "it doesn't support binary files"

pwillis-oi avatar Jan 22 '26 17:01 pwillis-oi

Any updates on this issue? It should be at least possible to manually review binary files, or override this setting, or to be able to whitelist some types of files. Using codex to automate generating a readme file with images and getting blocked by this is very unfortunate.

theolivenbaum avatar Jan 23 '26 03:01 theolivenbaum

As of 28 Jan 2026, this issue is still present. We expect at least an allowlist/whitelist within the project scope, i.e., shifting responsibility for potential risks to the user.

pvp-by avatar Jan 28 '26 16:01 pvp-by