Skip to content

/goal does not actually complete the goal when doing review loops #21176

Closed

Description

@matssk

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

Activity

  1. added
    bug
    on May 5, 2026
  2. changed the title [-]/goal does not work at all[/-] [+]/goal does not actually complete the goal[/+] on May 5, 2026
  3. added
    CLI
    model-behavior
    on May 5, 2026
  4. github-actions commented on May 5, 2026

    @github-actions
    Contributor

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

    Powered by Codex Action

  5. matssk commented on May 5, 2026

    @matssk
    Author

    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

  6. removed
    model-behavior
    on May 5, 2026
  7. etraut-openai commented on May 5, 2026

    @etraut-openai
    Contributor

    Thanks for reporting. This feature is still under development.

    Please use /feedback to upload your logs and session details and post the session ID here.

  8. changed the title [-]/goal does not actually complete the goal[/-] [+]/goal does not actually complete the goal when doing review loops[/+] on May 5, 2026
  9. matssk commented on May 5, 2026

    @matssk
    Author

    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.

  10. etraut-openai commented on May 13, 2026

    @etraut-openai
    Contributor

    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.

  11. matssk commented on May 18, 2026

    @matssk
    Author

    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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    CLIbug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions