codex icon indicating copy to clipboard operation
codex copied to clipboard

Everytime codex tries to use the `apply_patch` tool, it hangs indefinitely.

Open denismaciel opened this issue 1 month ago • 8 comments

What version of Codex is running?

0.63

What subscription do you have?

Pro

Which model were you using?

It happens with all of tehm

What platform is your computer?

NixOS

What issue are you seeing?

Everytime codex tries to use the apply_patch tool, it hangs indefinitely.

Image

What steps can reproduce the bug?

Uploaded thread: 019ab7d4-42dc-7402-88e8-476998ceb487

What is the expected behavior?

Codex successfully applies a patch.

Additional information

No response

denismaciel avatar Nov 24 '25 21:11 denismaciel

Potential duplicates detected. Please review them and close your issue if it is a duplicate.

  • #7109

Powered by Codex Action

github-actions[bot] avatar Nov 24 '25 21:11 github-actions[bot]

Facing the same issue

amitbcp avatar Nov 25 '25 01:11 amitbcp

Try enabling debug logging to see what Codex is doing when it hangs. It may be stuck in an infinite loop.

For more detail, set the RUST_LOG environment variable to codex_core=debug, reproduce the issue, and then check the logs at ~/.codex/log.

Hope this helps.

448523760 avatar Nov 25 '25 15:11 448523760

Hi @448523760, @amitbcp, @denismaciel thanks for filling in this bug. I've just tried your example @denismaciel and it worked for me on a dummy markdown file that I have on a testing codex repo:

Image

Could you try again using gpt-5.1-codex-mini see if that helps? the max model worked for me but I would like to understand if switching to a faster model improves this issue.

lionel-oai avatar Nov 27 '25 16:11 lionel-oai

@lionel-oai I have tried all variations and it hangs!

Can you please tell me how to enable debug a bit unclear on how to, so that can share

amitbcp avatar Nov 30 '25 18:11 amitbcp

I have uninstall codex and reinstalled with bun and it works for me. No idea why.

denismaciel avatar Nov 30 '25 19:11 denismaciel

You can check out https://github.com/openai/codex/blob/main/docs/advanced.md#tracing--verbose-logging for enabling tracing for your codex session @amitbcp. Are you using the CLI or the IDE?

lionel-oai avatar Dec 01 '25 16:12 lionel-oai

I am using CLI

amitbcp avatar Dec 01 '25 23:12 amitbcp

@amitbcp After enabling tracing, please share any relevant snippets from the logs. #7491 has a similar issue with a solution; see if that applies in your case as well.

Also, it would be helpful if you could share the thread-id for a session with the issue (you can obtain this via the /feedback command in the CLI).

sayan-oai avatar Dec 08 '25 16:12 sayan-oai