Goal tool treats completed goals as active while /goal can start a new one

Open 💬 0 comments Opened Jun 16, 2026 by nima20002000

What variant of Codex are you using?

Codex CLI

Version / feature state

Observed from a local session on 2026-06-16:

codex-cli 0.139.0
codex features list: goals stable true

Summary

The agent-visible create_goal tool and the user-facing /goal slash command appear to disagree about completed goals.

When a user asks the assistant to start a new goal, the expected workflow is for the assistant to call create_goal with the drafted objective. If the previous goal has already been accomplished, that should not block the new goal. Instead, create_goal can reject the request because it still detects the old completed/accomplished goal as an active goal.

However, if the user manually runs /goal <new goal text> in the same situation, the CLI does not show an active-goal error and the new goal can be started. That makes the tool path feel broken even though the slash-command path works.

Why this is annoying

This breaks the natural handoff where the user says something like "start a goal for this" and expects the assistant to activate it. The assistant has the right tool and is following the intended goal workflow, but it gets stuck on stale completed-goal state. The user then has to manually run /goal ..., even though the CLI itself is capable of accepting the new goal.

Expected behavior

Once the previous goal is complete/accomplished, both paths should behave consistently:

  • create_goal should allow starting a new goal after a completed/accomplished goal, or
  • completed goals should be cleared from the active-goal check, or
  • the agent should have a tool equivalent to whatever /goal does when it successfully replaces or bypasses completed state.

Actual behavior

  • User asks the assistant to start a goal.
  • Assistant calls create_goal.
  • create_goal refuses because it detects an already-active goal, even though that goal is already accomplished.
  • User can manually run /goal <goal text> and does not get the same active-goal error.

Reproduction outline

  1. Start a Codex session with goals enabled.
  2. Create a goal through the agent-visible create_goal flow.
  3. Complete/accomplish that goal through the normal completion flow.
  4. Ask the assistant to start a new goal.
  5. Observe create_goal reject the new goal because the completed goal is still treated as active.
  6. Run /goal <same new goal text> manually.
  7. Observe that /goal does not fail with the same active-goal error.

Related

This is related to #24978, which asks for a clear/reset mechanism for completed goals. This report is narrower: the user-facing /goal command already seems able to start a new goal in the state where the agent-visible create_goal tool refuses, so the lifecycle checks are inconsistent.

View original on GitHub ↗