codex - 💡(How to fix) Fix /goal auto-runs after `codex resume` without user confirmation [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openai/codex#21123Fetched 2026-05-05 05:53:17
View on GitHub
Comments
1
Participants
2
Timeline
10
Reactions
0
Timeline (top)
labeled ×5unlabeled ×3closed ×1commented ×1

Root Cause

This can be surprising and potentially unsafe because the user may only intend to inspect the previous session, not continue executing actions automatically.

RAW_BUFFERClick to expand / collapse

What version of Codex CLI is running?

codex-cli 0.128.0

What subscription do you have?

Plus

Which model were you using?

gpt-5.5

What platform is your computer?

Linux 7.0.0-14-generic x86_64 unknown

What terminal emulator and version are you using (if applicable)?

Ghostty

What issue are you seeing?

There seems to be an issue with the /goal feature when resuming an existing Codex session.

If a user enables and uses /goal, then closes the session before the goal has fully completed, running codex resume later reopens the session and automatically continues/runs the goal without asking for user confirmation.

In some cases, the goal starts running before a clear loading/status indicator is shown, so the user may not realize that Codex has already resumed execution.

What steps can reproduce the bug?

  1. Start Codex CLI.
  2. Enable or use the /goal feature.
  3. Begin a goal-driven task.
  4. Close the session before the goal is fully completed.
  5. Later, run codex resume to reopen the previous session.
  6. Observe that Codex automatically resumes/runs the goal.

What is the expected behavior?

When resuming a session that has an unfinished /goal, Codex should not automatically continue executing the goal.

Additional information

This can be surprising and potentially unsafe because the user may only intend to inspect the previous session, not continue executing actions automatically.

A resumed session should require explicit user consent before continuing an unfinished /goal.

extent analysis

TL;DR

The issue can be mitigated by modifying the codex resume command to prompt for user confirmation before resuming an unfinished goal.

Guidance

  • Verify the current behavior by following the steps to reproduce the bug and observing if the goal resumes automatically without user confirmation.
  • Consider adding a flag to the codex resume command to require explicit user consent before continuing an unfinished goal, such as --confirm-goal or --ask-before-resume.
  • Review the Codex CLI documentation to see if there are any existing options or configurations that can be used to achieve the desired behavior.
  • If no existing solutions are found, consider submitting a feature request to the Codex CLI developers to add a confirmation prompt for resuming unfinished goals.

Example

No code snippet is provided as the issue does not imply a specific code change, but rather a change in the command-line interface behavior.

Notes

The provided guidance assumes that the issue is specific to the codex-cli version 0.128.0 and the gpt-5.5 model. The behavior may vary with different versions or models.

Recommendation

Apply a workaround, such as using a custom script to wrap the codex resume command and prompt for user confirmation before resuming an unfinished goal, until a fixed version of the Codex CLI is available.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

codex - 💡(How to fix) Fix /goal auto-runs after `codex resume` without user confirmation [1 comments, 2 participants]