GPT 5.2 keeps staging its changes

Resolved 💬 4 comments Opened Dec 21, 2025 by lukaszciastko Closed Mar 29, 2026
💡 Likely answer: A maintainer (github-actions[bot], contributor) responded on this thread — see the highlighted reply below.

What version of Codex is running?

0.77.0

What subscription do you have?

Pro

Which model were you using?

gpt-5.2-codex

What platform is your computer?

Darwin 25.2.0 arm64 arm

What issue are you seeing?

Codex has recently started staging its changes and performing “cleanups” of files it didn’t modify. Consequently, when iterating over changes, it becomes challenging to discern which files were actually altered. Moreover, Codex continues to delete files it didn’t create, claiming to have “cleaned up” and identified untracked files. In the past, codex was never staging changes on its own.

What steps can reproduce the bug?

Use codex in a normal dev workflow, perhaps with --dangerously-bypass-approvals-and-sandbox.

What is the expected behavior?

_No response_

Additional information

_No response_

View original on GitHub ↗

4 Comments

github-actions[bot] contributor · 8 months ago

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

  • #8213
  • #8214

Powered by Codex Action

Galaxy-0 contributor · 8 months ago

I did some digging and I believe I found the root cause in codex-rs/utils/git/src/apply.rs.

Line 55 unconditionally uses the --3way flag:

let mut args: Vec<String> = vec!["apply".into(), "--3way".into()];

According to man git-apply:

When --3way is used, if the patch applies cleanly, the edited file is placed in the index and the working tree.

This explains why changes applied by Codex are always staged. Removing --3way would solve the implicit staging behavior but might reduce the success rate of applying patches that have minor context mismatches.

SilentFlower · 8 months ago

I ran into the same issue. Not sure which version caused it, so I’m going to roll back a few versions and see.

etraut-openai contributor · 5 months ago

This bug report hasn't received any upvotes or additional posts in three months. Closing.