Codex using Python to make edits to files #3057
Replies: 12 comments 9 replies
-
From a User Experience angle it's not great, as you can't see the immediate diff made like with the file edit tool. I've also found the changes that codex makes using this approach is more sloppy than if it actually edits the file, and I think its indexing too hard on the feedback of print('patched move & removed guide') which it creates for itself as signal the change was successful. |
Beta Was this translation helpful? Give feedback.
-
I'm having this happen to me a lot. For some reason > 80% edits are achieved via Python and Bash rather than the built in tool. Occasionally telling it to please edit via built in file edit tools and not via Python or via direct Bash calls works. But in this last case, I specifically asked at the start and it went ahead and changed ~250 lines over 7 files all outside of the expected workflow Sure, I can review the work looking at the diff, but it's just odd that it consistency picks ways to edit files that don't align with the intended UX. |
Beta Was this translation helpful? Give feedback.
-
I have the same problem in Windows, and it's pretty annoying because these changes require quite a few iterations before they actually work using a custom Python script. Sometimes it also tries to do it using some strange PowerShell commands that don't work properly with line breaks or multi-line changes. Why not simply use the built in EDIT Tool, or similarly the diff+merge tool like it is done when using from VSCode? |
Beta Was this translation helpful? Give feedback.
-
I personally think its a product of the RL environment that OpenAI is using to train gpt5, where it probably doesn't have access to the typical file edit tool, so it tries to use alternatives like trying to edit files with ephemeral scripts it makes. So from my perspective its either the File Edit tool in codex is either not "ergonomic" enough for the model to use, or its a problem with the model itself that cant be fixed with codex. |
Beta Was this translation helpful? Give feedback.
-
Same here on macOS. Doesn't that make the already slow Codex even slower? |
Beta Was this translation helpful? Give feedback.
-
Do I have to give it permissions to use file edit? Because I'm having the same problem. |
Beta Was this translation helpful? Give feedback.
-
Also was surprised by that. Some people told me using and MCP server for file editing could help, but didn't have a chance to try. |
Beta Was this translation helpful? Give feedback.
-
Is there an open issue for this? |
Beta Was this translation helpful? Give feedback.
-
Sometimes it's using git diff tool to edit files. Weird but works fine most of the time |
Beta Was this translation helpful? Give feedback.
-
Changing the model from gpt-5-codex / medium to gpt-5 / medium fixed this for me. |
Beta Was this translation helpful? Give feedback.
-
I personally think this is really cool. There’s something beautiful about AI made with code using code to write more code. Full circle moment if you ask me. I was hesitant at first, telling it to “stop using python to edit files” in my AGENTS.md, but, low and behold, Codex started using Ruby to edit files. Honestly, just let it do its thing. It’s an incredible model. |
Beta Was this translation helpful? Give feedback.
-
#如果您尝试在不支持其本机沙盒机制的环境(例如较旧的 Linux 内核或 Windows)中使用 Codex,则可能还需要使用此选项。 在配置文件中添加这个,一切都好使了. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I have found that instead of using the File Edit tool which it has, it runs python to make the changes.
This is quite interesting behavior, has anyone else seen this happen in their Codex Usage?
Could this because of a problem with the file edit tool, so codex prefers to script the changes with python?
Beta Was this translation helpful? Give feedback.
All reactions