Codex exec terminates after making a plan (only when using gpt-5-codex)

Resolved 💬 4 comments Opened Sep 19, 2025 by alexyangjie Closed Sep 25, 2025

What version of Codex is running?

codex-cli 0.39.0

Which model were you using?

gpt-5-codex

What platform is your computer?

Linux 6.1.150-174.273.amzn2023.x86_64 x86_64 x86_64

What steps can reproduce the bug?

  1. Set no sandbox and full auto mode.
  2. Go to any repository.
  3. Use codex exec to just modify some files. E.g.
codex exec "Can you modify some files so that I can test your capabilities, any modifications are fine"

What is the expected behavior?

Codex modify some files and then quits.

What do you see instead?

Codex starts running, makes a plan, and then just quits. No file has been modified.

Sample logs:


Can you modify some files so that I can test
▌ your capabilities, any modifications are fine

> Plan

  - Update scripts/copy_file.py to accept CLI
  arguments plus simple safeguards.
  - Extend scripts/move_file.py with a dry-run
  option and better error handling.
  - Improve scripts/list_files.sh by adding
  filtering/sorting switches, then note the
  changes in README.md.

Additional information

Sometimes it works fine but a lot of times (2/3 times) it triggers this issue. Using the original gpt-5 does not trigger the issue. It only happens with the new gpt-5-codex model and only when using codex exec.

When it happens there is no errors or warnings displayed. Just normal exits.

View original on GitHub ↗

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