[Bug] CLI returns success but applies no changes when LLM-generated diff has minor whitespace mismatches
What version of Codex is running?
0.63
What subscription do you have?
iam using gpt oss 120b which is deployed in ibm watson x
Which model were you using?
gpt oss 120b
What platform is your computer?
in vm which is linux based
What issue are you seeing?
I am using CodexCLI to automate updates to Ansible/YAML configuration files. I have observed that when the LLM generates a unified diff (patch), the CLI attempts to apply it but fails silently if there is a minor whitespace or indentation mismatch between the patch and the target file.
The process exits with code 0 (Success), but git diff shows "No uncommitted changes."
What steps can reproduce the bug?
Steps to Reproduce:
Have a target YAML file (e.g., common_vars.yml) with specific indentation.
Invoke codex exec with a prompt to update a variable in that file.
The Agent generates a diff where the context lines have slightly different spacing than the actual file (common with LLMs).
The CLI execution finishes without error.
Result: The file is unchanged on disk.
Observed Behavior: The tool fails to apply the patch due to strict context matching but does not report a failure or fallback to a fuzzy patch application. It creates a "silent failure" state.
Logs/Evidence: In my logs, I see the following behavior:
CodexCLI RAW OUTPUT:
Action: edit(path="common_vars.yml", ...)
'No uncommitted changes' count: 1
"Avoid strict context patches... Instead, output a sed command..."
What is the expected behavior?
Suggested Fix: Please implement "fuzzy patching" (ignoring whitespace) by default for YAML/Code files, or provide a flag (e.g., --fuzzy-patch) to allow the agent to apply changes even if indentation in context lines doesn't match perfectly.
Additional information
_No response_
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗