/goal keeps restarting work after the goal is already completed

Resolved 💬 3 comments Opened May 12, 2026 by AhmedAlNeaimy Closed May 12, 2026
💡 Likely answer: A maintainer (github-actions[bot], contributor) responded on this thread — see the highlighted reply below.

What version of Codex CLI is running?

codex-cli 0.130.0

What subscription do you have?

ChatGPT Pro 20x

Which model were you using?

GPT-5.5 xhigh

What platform is your computer?

Darwin 25.5.0 arm64 arm

What terminal emulator and version are you using (if applicable)?

VSCode

What issue are you seeing?

When using the experimental /goal feature in Codex CLI on macOS, the goal appears to complete successfully, but Codex does not stop. Instead, it continues/restarts the work loop and begins working again even though the requested goal is already done.

What steps can reproduce the bug?

  1. Enable the /goal feature.
  2. Start a Codex CLI session.
  3. Run a goal with a clear completion condition, for example:

What is the expected behavior?

/goal Fix the issue, run the tests, and stop when the tests pass.

Additional information

_No response_

View original on GitHub ↗

3 Comments

github-actions[bot] contributor · 3 months ago

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

  • #22245
  • #21786
  • #22158

Powered by Codex Action

etraut-openai contributor · 3 months ago

If you're able to repro this, please use /feedback and post the session ID here. I can take a look. My best guess based on your report is that the agent isn't clear on the termination condition, so it doesn't mark the goal as complete.

AhmedAlNeaimy · 3 months ago

@etraut-openai Oh you mentioned something important, yes you're right i didn't add the termination condition after the goal is achieved, thank you!