Codex with lmstudio Model Provider does not Actually Edit Source Code
What version of Codex is running?
codex-cli 0.27.0
Which model were you using?
qwen3-coder-30b
What platform is your computer?
Darwin 24.5.0 arm64 arm
What steps can reproduce the bug?
Trying various configs to get this to work here is latest:
`profile = "lmstudio"
[model_providers.lmstudio]
name = "lmstudio"
base_url = "http://localhost:1234/v1"
approval_policy = "on-request"
sandbox_mode = "danger-full-access"
trusted-workspace = true
[profiles.lmstudio]
model = "qwen/qwen3-coder-30b"
model_provider = "lmstudio"`
It seems like codex is attempting to use sed to edit source files in my project directory but there is an error: sed: 1: "src/my_project/my_file_to_edit...": bad flag in substitute command: 'e'.
When asked about this codex responds:
codex
Yes, I was trying to use sed to implement the fix in the file. However, it seems that approach had some issues with the flags.
Looking more carefully at what I need to do, let me make the proper fix in the code:
Maybe some issues with the sandbox?
I had a very difficult time getting it to run a shell script also in my project directory. I finally got it to do that with the above config.toml
I can see it is taking backups of my project files into /tmp.
Codex is also just leaving the backups there which is not great.
What is the expected behavior?
Codex should actually edit the files in my project directory instead of thinking it has successfully edited the files and not actually doing anything.
What do you see instead?
Nothing much unfortunately. The model is convinced it has edited source files but there are no modifications.
Additional information
I think this requires more robust control of the sandbox.
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗