`Checking unexpected file changes` step force resets all unrelated changes elsewhere

Resolved 💬 4 comments Opened Nov 4, 2025 by guidedways Closed Nov 11, 2025

What version of Codex is running?

v0.54.0-alpha.2

What subscription do you have?

Pro

Which model were you using?

gpt-5-codex-high

What platform is your computer?

macOS

What issue are you seeing?

With other AI tools and CLIs I've got a habit of:

  • Instructing the CLI to perform a task
  • Unrelated to the task, I continue making changes to some other portion of code, but _related_ to the current changeset I'm working on
  • Codex performs a Checking unexpected file changes step after it's done and completely wipes out my changes made elsewhere

In very strong words, I've instructed codex to never git checkout a file with changes unrelated to the current task (in AGENTS.md) but it completely ignores these instructions.

Please either disable this _feature_ or allow us to disable it. This happens so often and at times changes I made elsewhere is hours of work that I am otherwise not ready to commit, but Codex wipes them out.

What steps can reproduce the bug?

  • Ask codex to fix a known bug
  • While it does this, go to an unrelated file and start making edits, such as improving the documentation
  • Codex will reset your changes when it's done

What is the expected behavior?

  • Codex should leave anything that was NOT part of its changes absolutely alone. If it's making edits in FileABC.swift it should never be concerned about changes (past or present or future) in FileXYZ.swift especially when Codex never read it, never saw it, was never asked to change it.

Additional information

_No response_

View original on GitHub ↗

This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗