If you want Codex to keep working until the end without you sending "continue" every time, write a one-line completion condition after /goal.

/goal Fix the undo-delete feature so that a restored item keeps its original position and completion state, saves persist after restoring, and all related tests pass

A normal request stops when Codex replies. Once you set /goal, Codex keeps going on its own with "work → check → next work," using the completion condition as the benchmark. It stops when the condition is met, when the budget is reached, or when your decision is needed. The right response depends on why it stopped, so use one of these three approaches:

Reply and end after each stage

In a regular request, write something like "investigate → fix → verify."

Go to the batch request example
Keep working across the next turn too

Use /goal to keep the completion condition in the same chat.

Go to how to start Goal mode
Waiting for approval of an action

Check the scope of permissions and who approves.

Go to app, CLI, and IDE approvals

/goal suits work that repeats reproducing, fixing, and testing bugs. It is not simply a command to run for a long time. It is a feature that keeps track of what counts as done.

Decide these three things first

Outcome

Which bug to fix, or what to build

Constraints

Scope of changes, behavior to preserve, and operations you may run

Verification

Which tests or measurements determine that the work is complete

1. What /goal is: differences from regular requests, /plan, and dot

/goal is a feature that sets an ongoing goal in a Codex chat. Even if tests fail partway through, it can choose the next step based on the original completion condition. OpenAI cites uses such as investigating bugs where the next step depends on what the investigation finds, performance improvement, migrations, and research.

Work and verify repeatedly against the goal

  1. Work: Research code or materials, then fix or measure
  2. Check: Judge whether there is evidence that the goal is met
  3. Branch: If achieved, finish; if not, do the next step; if progress is blocked, report why

Even when the goal is not yet met, work continues as long as the goal is active, within budget, and the conditions for automatic continuation are satisfied.

According to the official explanation, a goal is state saved in the current chat. It is not a global memory applied automatically to other chats, nor a rule for the entire repository. Even with a goal set, the code, tests, and materials needed must be accessible from that chat. Source: OpenAI Cookbook "Using Goals in Codex".

ApproachSuited toWhen to use it
Regular requestExplanations, fixes, and research, implementation, or verification within the requested scopeWhen you want to hand off a series of tasks and receive the result
/planDeciding what to build and how far to fixWhen the goal is still vague and you want to settle requirements and verification criteria
/goalWork that reaches a completion condition through repeated research, fixes, and verificationWhen the endpoint is clear but the steps to reach it are not yet known
dotOngoing support, delegation to development staff, and progress managementWhen you also want to delegate coordinating multiple tasks

Claude Code also has a /goal with the same name, where a separate model judges the result after each turn. The differences are compared in "What is Claude Code's /goal?".

Creating a plan alone does not start automatic continuation in Goal mode. For the difference from dot (ChatGPT's continuous AI agent), see how to use dot, its pricing, and delegating to Codex. For how to provide information, see also context engineering.

You can also ask for research, fixes, and verification together in a regular request

If you only ask "investigate first," it is expected behavior for the reply to end with the findings. If you also want the fix, state the scope through completion from the start. A regular request can cover several steps, but automatically starting the next turn after a reply is separate from /goal.

Please take the save bug in this to-do app through investigation, fix, and verification.
Completion condition: adding, toggling completion, and deleting results remain after reloading, and existing related tests pass.
Carry out the related file and test changes and the local checks allowed within scope. Do not end with just submitting findings or a plan. If a check fails, investigate the cause and proceed through the related fix and re-check.
Do not allow introducing new dependencies, publishing, pushing, purchasing, or changing device settings.
If there is an important specification decision, insufficient permissions, a usage limit, or a check that cannot run, report the reason and the decision needed. Do not work around safety refusals.
Finally, summarize the changes, the checks run and their results, and any items not performed.

The key point is not "run everything without checking," but separating pre-approved work from decisions returned to a person. A request text is not a substitute for technical access restrictions. If you want to see the approach before implementation, use /plan first and then request the implementation. Sources: official prompting guide, regular turns and goal continuation.

2. Getting started on desktop, CLI, and IDE

The same /goal works differently depending on the screen you use after starting. OpenAI's official guide to long-running work explains how to start on desktop, in the CLI, and in the IDE extension. For the web, instead of /goal, the guidance describes how to convey outcomes, constraints, and evaluation criteria to ChatGPT Work.

Desktop

  1. Open the target project and chat
  2. Use /goal in the input box and state the completion condition
  3. Check the goal progress line above the input box

Pause, resume, edit, and clear are all done from that progress line.

Codex CLI

  1. Open an interactive session in the target work folder
  2. Enter the goal after /goal
  3. Send status checks or fix instructions in the same session

To check status or pause, use the CLI commands described later.

IDE extension

  1. Open the target workspace
  2. Use /goal in the extension's chat
  3. Pass additional information in the same chat

Keep the workspace available while work is running.

For the CLI, the OpenAI Cookbook lists Codex 0.128.0 or later as the supported version. The current settings reference says features.goals is a stable feature and is enabled by default. Do not assume you must add the earlier experimental-feature steps to your settings. If you cannot find it, check the screen and version you are using and the current official guidance.

Sources: long-running work guide, desktop slash commands, configuration reference.

Reducing approval waits: app/IDE controls and CLI settings

/goal does not change approval settings. Whether work continues and whether file changes and network access are allowed are separate questions. The official guidance says that for normal work you start with Ask for approval, and routine operations within the permitted scope proceed without approval each time.

Desktop and IDE extension

  1. Open the permissions control below the input box in the target chat
  2. Check the currently selected mode
  3. To leave approval of the target to automatic review, if available, choose Approve for me

Depending on the version or organization policy, this may not appear or may not be selectable.

Codex CLI

During an interactive session, check or change permissions with /permissions. An example startup command that specifies automatic review is shown below.

codex --sandbox workspace-write --ask-for-approval on-request -c approvals_reviewer=auto_review

Administrator restrictions take precedence over this setting.

Automatic review flow

Routine work within the permitted scope proceeds as is. Approval for operations that cross the boundary is decided by a separate reviewer.

Approved → continue

Run that operation and move on to the next task.

Denied → alternative or waiting for a decision

Switch to a sufficiently safe alternative, or return the decision to a person.

Approve for me is not a setting that widens access. Reviews can be wrong, and they do not guarantee safety or uninterrupted operation. Approvals for Computer Use apps are still shown directly to the user. Also, approval_policy = "never" means approval prompts are not shown; it is not a setting that lifts the sandbox. Some work will fail because it cannot get past restrictions, so do not use this as a way to "complete everything without stopping."

Automatic review involves additional model calls, so Codex usage may increase. Reducing approval waits and conserving usage limits are different things. Source: usage for automatic review.

ChatGPT Work on the web has no sandbox or approval mode selection like local Codex. Do not apply the desktop steps to the web as they are. For detailed permissions and the handling of secret files, see Codex file permissions and access restrictions. If you do not want files changed, see how to use Codex and Claude Code in read-only mode.

Sources: how to choose permission modes, conditions and limits of automatic approval review, CLI examples, differences between web and local.

3. Defining completion criteria: fixing vague goals

Saying only "make it high quality" or "keep going until it's done" makes it hard to judge what counts as complete. The completion criteria should use results you can confirm. Specify things such as screen width, behavior after saving, test results, or materials to compare.

A request that is hard to judge

"Make this to-do app look nice and keep going until it's complete"

The appearance, target features, checks, and stop conditions are not defined.

A request whose results can be verified

"Make it possible to restore the one item I just deleted to its original position and completion state. Check that saving works after restoration and that double restoration is prevented, and report the results."

Match each required function with the evidence used to judge success.

In the CLI, the goal text must be non-empty and no more than 4,000 characters. Rather than packing in a full long specification, point to a specification file and keep the outcome, key constraints, and verification conditions in the goal. Even if you pass a file, the history of another chat is not automatically carried over. Source: Codex CLI slash commands.

If the specification is not decided yet, you can first ask: "Do not implement yet; organize the requirements and draft a /goal." Review the draft with /plan, then read the proposed goal yourself, confirm the conditions to keep and the scope of changes, and start.

4. Request examples for bug fixes, UI improvements, and research

The following are request examples. First confirm whether tests and browsers are available in your environment, and include a condition to report any checks that cannot be run as not performed.

Bug fix: separate the reproduced problem from regressions

/goal Fix the "undo delete" feature in the to-do app so that the item I just deleted can be restored to its original position and completion state.
Keep the existing add, toggle-complete, delete, and save behavior.
First reproduce the problem. After the fix, check the restore position, the completion state, prevention of double restoration, consecutive deletions, and saving after restoration.
Change only the related files and tests. Do not introduce new dependencies, publish externally, push, or make purchases.
If a check cannot be run, report the reason and the environment needed. The completion report should include the changed files, the commands run and their results, and any checks not performed.

"Passes the tests" alone would also look like the goal was met for a change that removes features to make the tests pass. Stating the behavior to preserve and the scope you may change gives a basis for judging how to fix it.

UI improvement: specify display and operation conditions

/goal Make this screen not overflow horizontally at 390px and 1280px widths, and make the complete and delete buttons usable even with long task names.
Do not change the existing data structure or save format.
Check both widths in an available real browser, and test adding, toggling completion, deleting, saving after reload, and keyboard operation.
If browser checks are not available, do not treat image or code review as a substitute for real operation. Report it as not performed.
Do not publish, push, make purchases, or change device settings.

Keep the results from operating in a real browser separate from results based only on code or images.

Research: keep the evidence rather than filling in unknown items

/goal Compare the data storage, training use, and deletion terms of the two specified services, using publicly available official documents.
For each claim, match the source URL and the conditions in the text you checked, and create a comparison table and explanation.
For items you cannot find an explanation for, show the material you checked and the missing information. Do not fill in the table with guesses.
Do not log in, change settings, connect apps, upload files, or make purchases.
At the end, submit separately the specifications you confirmed, your interpretations, and the items you checked but could not confirm.

"Keep going indefinitely until every item has an answer" loses the endpoint for research. Even when information is not public, you can define a report that shows the scope you checked and the remaining questions as the deliverable.

5. Pause, resume, edit, and clear

On desktop, use the goal progress line above the input box. The CLI commands are listed below. Do not read the CLI table as a direct equivalent of desktop button operations.

What you enter in the CLIPurposeWhat to check
/goalShow the current goalIs it the completion condition for this work?
/goal editEdit the goalDoes it need re-checking under the new conditions?
/goal pausePause an active goalCheck the state after pausing
/goal resumeResume a paused goalHave the work environment or constraints changed?
/goal clearClear the current goalDo not leave an old completion condition for the next task

During work, you can still pass additional information or constraints in the same chat. If your judgment changes, state it explicitly, for example: "Do not publish yet" or "Drop the change to this feature." After editing a goal, also check whether the earlier test results alone satisfy the new completion condition.

Stopping or clearing is not an operation that reverts completed changes.

If you need to restore code or saved data, check the diff and the save state separately. In the CLI, /stop stops background terminals; it is not an alias for /goal pause.

Sources: CLI goal operations, desktop goal operations.

6. Token budget, usage limits, and pricing differences

For ongoing work, separate where the goal is cut off from how much of your plan's allowance is consumed. Even if the goal's budget remains, work may be unable to continue because of your account's usage limits or a problem in the execution environment.

ItemWhat it coversDo not treat it as the same as
Goal token budgetManagement of the budget and usage for continuing that goal's workYour remaining plan allowance, or a strict cap on billed amounts
Plan usage limits and creditsThe shared allowance and additional balance for using Work, Codex, and similar servicesA budget dedicated to a single goal
Context capacityThe amount of context the model can processThe total tokens for ongoing work, or the monthly fee

Does /goal incur extra charges?

The official pricing material does not include a per-start charge for /goal. However, repeated model processing is consumed as normal Codex usage. Turning on Goal mode does not make repeated cycles of testing, fixing, and checking free or unlimited.

OpenAI explains that Work and Codex share usage limits, and that usage varies with the model and the type of work. You also need to distinguish between continuing with additional credits after your plan allowance is used up and being billed separately under an API key. Source: Work and Codex pricing and usage limits. For plan selection and resets, see ChatGPT Pro plan and usage comparison.

What can the budget figures tell you?

The developer-facing App Server material includes fields that record the token budget, usage, and elapsed time for each goal (such as tokenBudget). However, the official documentation does not explain how general users set a budget, or the exact relationship between a goal's usage and billed amounts. Replacing a goal with a new one resets that goal's usage, but your plan's allowance does not come back. Source: goal management in App Server.

7. What to check when work stops partway

Even with a goal active, not every stop is overcome automatically. First check the current goal and the last result, then narrow down the cause in this order.

① Goal state

Is it completed, paused, cleared, or has it reached its budget? If it is completed, check the evidence that the completion condition was met.

② Waiting for your input or decision

Is it waiting for an approval or for needed information? If an additional message is pending, that processing may need to come first.

③ Budget, plan allowance, and model

Check separately whether the goal budget has been reached, whether the plan's usage limit has been hit, and whether the selected model shows an error.

④ Execution environment

Are the required files, dependencies, test tools, and connections available? For work on a local PC, also check that the PC is running.

According to the Cookbook, automatic continuation happens when the chat is idle, the goal is active and within budget, and no other processing or user input is pending. Work that only involves planning does not start continuation, and an interruption pauses the goal. Also, if a continuation turn never calls any tool, the next automatic continuation is suppressed to avoid meaningless repetition.

When the budget is reached, the official design stops substantive work and reports the progress, obstacles, and next steps. Using up the budget and achieving the goal are different things. Before resuming, check the work still needed and the expected cost.

Starting /goal does not expand permissions or connection targets. The official material says it follows the existing sandbox and approval policy. It is also not a feature that automatically moves local work to the cloud. If a connection is about to be lost, pause the goal; the guidance says to resume once the environment is available again. Source: permissions and continuation conditions for long-running work.

If a model-side error such as "Selected model is at capacity" appears, check according to that message. Investigating and handling Codex at-capacity errors explains this separately from usage limits.

8. Evidence to check in completion reports

A reply that just says "It's complete" does not show whether the requested result was verified. What to check is the original goal and the evidence that corresponds to it. Even if tests pass, if operational checks were not performed, do not treat that scope as passed.

Completion conditionEvidence to receiveExample of a missing report
Bug fixedReproduction conditions, the change diff, and results under the same conditions after the fixChanged only suspicious code without reproducing the bug
Existing behavior preservedCommands and results of the related regression testsChecked only the new feature and did not look at existing saving
Screen and operations workReal operation at the specified widths, and results of input and reloadPassed based only on images, without checking saving or button operations
Research completed with groundsCorrespondence between claims and original text, conditions, and remaining questionsOnly a list of links, with no indication of what was actually confirmed

If something is missing, return to the same chat with specific requests such as "Check saving after reload" or "Show the original text and conditions for this claim." If you add completion conditions, update the goal too. If you want a review by a separate party, state that request explicitly, and distinguish a review that reads only the other party's report from checks that actually re-run.

Regular Codex development can also include requirements, implementation, and verification in one request. The value of Goal mode is keeping a completion condition across multiple tasks and using it as the basis for choosing the next step. For differences in products and execution forms, see the Claude Code vs Codex comparison.

9. Before you use it

  • Include the outcome, constraints, and verification in the goal text
  • Prepare the files and check environment needed in the chat where you run it
  • Manage desktop goals through the progress line, and CLI goals with the goal commands
  • Check the goal budget and your plan's usage limits separately
  • Compare completion reports against tests, diffs, real operation, and sources

If one fix or explanation is enough, a regular request is suitable. For work where the next step depends on research results and repeats toward the same completion condition, consider /goal. Choose based on confirmed outcomes, not on how long something ran.

Premise of this article: this article is based on the specifications confirmed in OpenAI's official documentation on October 9, 2026. How long work continues and how much it consumes varies greatly depending on the task, so start with a small goal and check how quickly it decreases on the usage screen.

10. Frequently asked questions

Can I stop sending "continue" every time?

Regular requests can also cover research, fixes, and verification together. To keep working toward the same completion condition after the reply, /goal is an option, provided the goal is active and meets the conditions for automatic continuation. Approval waits involve separate permission settings, and work also stops when the budget is reached or when a failure occurs. It is not a feature that removes the need for human judgment entirely.

Is /goal cloud-only? Does it keep running if I close my PC?

It is not cloud-only; it is described for the desktop app, Codex CLI, and the IDE extension. The environment needed for continuation depends on where the work runs. Setting a goal does not mean processing continues on a local PC that is switched off. For the conditions when you want to close your PC, see conditions for Remote and Cloud when closing your PC.

If I set a token budget, can I always cap the cost?

No. A goal's budget, your plan's allowance, additional credits, and API billing are separate. The relationship between a goal's usage and billed amounts is not officially explained, so do not rely on it as a cost ceiling.

Is it the same as using dot?

/goal manages a goal and its continuation within the same Codex chat. dot also handles ongoing support, and delegation or coordination for separate tasks. If you only want to advance a small development task, a direct request to Codex may be enough. Choose based on your purpose and on whom you want to handle progress management.