/goal does not actually complete the goal when doing review loops
What version of Codex CLI is running?
0.128
What subscription do you have?
Pro
Which model were you using?
gpt-5.5
What platform is your computer?
_No response_
What terminal emulator and version are you using (if applicable)?
_No response_
What issue are you seeing?
I asked it to review an implementation plan and fix any gaps or issues
I wrote the following
/goal review the plan ImplementationPlan.md and fix and gaps and issues that you find, do this in a loop until you find no more gaps and issues that needs fixing
It then claimed the goal was done. After it claimed the goal was done I wrote "Do another review" it found a lot of new issues with the plan.
What steps can reproduce the bug?
Write an implementation plan as an md file
Then write:
/goal review the plan ImplementationPlan.md and fix and gaps and issues that you find, do this in a loop until you find no more gaps and issues that needs fixing
Then:
"Do another review"
It will return found a number of issues that it finds (at least it has done every time I tried)
What is the expected behavior?
It should have finished the goal and done reviews and fixes in a loop until it could not find any more issues.
Additional information
_No response_
6 Comments
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
So the workaround I use for now, which actually does work and finishes the goal is that I add commands on repeat using tab.
So I write "review the implementation plan and report back with any gaps or issues that you find"
"fix the issues"
"do another review"
"if there was any issues in the last review, fix these issues"
"do another review"
"if there was any issues in the last review, fix these issues"
"do another review"
"if there was any issues in the last review, fix these issues"
"do another review"
"if there was any issues in the last review, fix these issues"
"do another review"
"if there was any issues in the last review, fix these issues"
...
Just add a lot of these using tab still sees to be much more reliable than using /goal
Thanks for reporting. This feature is still under development.
Please use
/feedbackto upload your logs and session details and post the session ID here.The issue seems to be with how concretely the goal state is defined in the initial prompt. When I ask it to implement an implementation plan, the end state is concretely defined in the plan and it seems like it often handles that quite well.
However when I ask it to review something or review an implementation and do that in a loop until it no longer finds any issue, it needs to "do another review" each time it has fixed some issues. The goal is basically do reviews in a loop and fix all issues found each time, but since the end state here is less concrete and finding the new issues requires it to rerun its initial prompt, it struggles.
After I implement something, I do usually not go straight to /review, instead after it reports back that it's done implementing, I'll do something like "review your changes", then when it reports back list a list of issues, I ask it to fix them. Then I will do this in a loop until it no longer finds any issues or only finds low importance or P3 issues (then I'll run /review and it will typically find something more). Anyway, I've been trying to get this to work using /goal and it does go on a bit more than without /goal, but even after it claims to have finished the goal, I can usually still run maybe another five iterations where it will find issues of high importance. So it's the same for reviewing new specs, new implementations plans or recently implemented changes.
I've improved the goal continuation prompt. It will be included in the next release (0.131.0). Please give it a try and let me know if that works better.
I'll try it out in the next release. I have found that tweaking the goal prompt can also give big improvements and now I generally use an md file for the goal to specify the goal criteria, since it tends to get larger than the goal limit most of the time. Perhaps something like a combination of goal and planning mode could be nice, as is your first specify the goal, then use (goal?) planning mode to expand it and ensure it has clear verifiable things to check that it has reached the goal