Feature request: allow starting a new goal immediately after completing one

Open 💬 2 comments Opened Jun 25, 2026 by nima20002000
💡 Likely answer: A maintainer (github-actions[bot], contributor) responded on this thread — see the highlighted reply below.

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_goal style action after completion
  • allowing create_goal once 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.

View original on GitHub ↗

2 Comments

github-actions[bot] contributor · 2 months ago

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

  • #28430
  • #28482

Powered by Codex Action

Nicolas0315 · 2 months ago

Verified on current main that the backend goal tools already support the requested handoff path: create_goal is rejected while a goal is unfinished, update_goal({ status: "complete" }) preserves the completed goal state, and a subsequent create_goal immediately creates a new active goal with fresh accounting.

Evidence:

  • codex-rs/ext/goal/src/spec.rs describes create_goal as 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_goal exercises exactly this sequence.
  • Verification command: 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.