Goal tool treats completed goals as active while /goal can start a new one
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_goalshould 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
/goaldoes when it successfully replaces or bypasses completed state.
Actual behavior
- User asks the assistant to start a goal.
- Assistant calls
create_goal. create_goalrefuses 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
- Start a Codex session with goals enabled.
- Create a goal through the agent-visible
create_goalflow. - Complete/accomplish that goal through the normal completion flow.
- Ask the assistant to start a new goal.
- Observe
create_goalreject the new goal because the completed goal is still treated as active. - Run
/goal <same new goal text>manually. - Observe that
/goaldoes 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.