Feature request: allow starting a new goal immediately after completing one
Feature request
When an agent completes an active goal, it would be useful for the goal lifecycle to support an immediate handoff into a new goal in the same session.
Right now, completing a goal feels like an endpoint. In practice, users often treat a goal as one bounded checkpoint in a longer workflow: finish the current objective, record it as complete, then continue directly into the next objective without needing to restart the flow manually.
Desired behavior
After a goal is completed, Codex should provide a clean way for the agent or user to start a new goal immediately, while preserving the completed goal's final state and usage/accounting details.
This could look like one of these options:
- an explicit
start_next_goalstyle action after completion - allowing
create_goalonce the previous goal has just been marked complete - a UI/CLI affordance that offers "Start next goal" after successful completion
Why this helps
This would make goals work better for multi-step projects where each goal is intentionally scoped, but the overall task continues. It also avoids making users choose between overly broad goals and repeatedly re-entering goal mode for each next phase.
Related: #24978 and #28430 discuss completed goals remaining active or needing clearer completion/clearing behavior. This request is specifically about making the next-goal handoff a first-class workflow, not treating it as a bug.
2 Comments
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
Verified on current main that the backend goal tools already support the requested handoff path:
create_goalis rejected while a goal is unfinished,update_goal({ status: "complete" })preserves the completed goal state, and a subsequentcreate_goalimmediately creates a new active goal with fresh accounting.Evidence:
codex-rs/ext/goal/src/spec.rsdescribescreate_goalas starting a new active goal when no goal exists or replacing the current goal when it is complete, and failing only when an unfinished goal exists.codex-rs/ext/goal/tests/goal_extension_backend.rs::installed_goal_tools_only_replace_complete_goalexercises exactly this sequence.cargo test --manifest-path codex-rs\Cargo.toml -p codex-goal-extension installed_goal_tools_only_replace_complete_goal -- --exact->1 passed.So the lower-level tool behavior requested here appears to be implemented already. If this issue is specifically about adding a visible UI/CLI affordance after completion (rather than permitting the tool call), that would be a narrower frontend/product follow-up.