Everytime codex tries to use the `apply_patch` tool, it hangs indefinitely.
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.
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
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
- #7109
Powered by Codex Action
Facing the same issue
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.
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:
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 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
I have uninstall codex and reinstalled with bun and it works for me. No idea why.
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?
I am using CLI
@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).