Skip to content
LinkedInX

/goal vs /plan in Codex and Claude Code: When to Use Each

Article cover for “/goal vs /plan in Codex and Claude Code: When to Use Each” over a pastel ringed planet and orbital lines Article cover for “/goal vs /plan in Codex and Claude Code: When to Use Each” over a pastel ringed planet and orbital lines

What you’ll learn

  • How to choose /plan or /goal based on whether the method is settled and repeated edits and checks are needed
  • How Codex and Claude Code differ in operation and completion checks, and how to write a request
  • How to set limits, human approval points, and stopping conditions

The Basic Difference Between /plan and /goal

Codex and Claude Code are tools for asking AI to edit documents or code and check the results. A session is one continuing conversation and its work. When asking them to work on a task, you may need help choosing an approach, or you may want it to keep making changes and checking results under an agreed plan. Use /plan for the first situation and /goal for the second. The two questions are whether the method is settled and whether the work needs multiple turns—a turn is one round of the AI’s response or work.

For example, when moving older articles to a new format, start with /plan if the editing order or protected sections are unresolved. Once a person approves the plan, hand the repeated changes and checks to /goal.

This article covers product behavior, suitable tasks, and request templates. It also explains usage limits and human review so you can choose the command that fits your work.

Roles and Outputs of /plan and /goal

/plan asks the AI to investigate before making changes and put the proposed method into a plan. /goal carries the agreed objective forward across multiple turns until the completion criteria are met. In Plan, you review the proposed plan; in Goal, you review the verified changes or document.

The table compares what the AI does and what a person reviews at each stage. Acceptance criteria are the requirements a result must meet for a person to accept it.

Perspective/plan/goal
Question it answersWhat should be done, in what order, and with which risks?What counts as complete, and how long should execution continue?
Main phaseInvestigation, comparing approaches, and reviewing the change scopeChanging documents or code, repeated edits, and checks
Human checkpointApprove direction, scope, and acceptance criteriaApprove exceptions, privileged actions, and the final result
End stateAn executable, reviewed planA result proven by tests, metrics, counts, or completed files or reports
Example used aloneCompare design options without executing themRewrite older articles in a new format using an already approved method
Example used togetherSettle the approach for complex workExecute the approved plan to a verifiable completion condition
This table scrolls horizontally. Keyboard users can focus the table and use the left and right arrow keys.

For the same task, you can use /plan to review the approach and /goal to carry out the approved work. Separating these stages also makes it clear what a person is approving.

/goal Completion Criteria and Product Behavior

/goal gives a coding agent—AI that edits code or documents and checks the results—a continuing objective and stopping conditions. Because it can work longer than a normal request, specify both the task and the evidence that will show it is complete.

Codex and Claude Code differ in how you manage goals and how completion is evaluated.

ItemCodexClaude Code
Main roleAttach a persistent objective to the active chatContinue turns until a completion condition holds
Basic controlsSet, view, edit, pause, resume, and clearSet, view, and clear
Completion decisionCodex treats the Goal text as both the first prompt and the completion criteriaA separate small AI evaluates the transcript after each turn
Suitable scopeLarger than one request and smaller than a work list with no defined endWork requiring several exchanges whose completion can be demonstrated in the conversation
This table scrolls horizontally. Keyboard users can focus the table and use the left and right arrow keys.

Goal in Codex

In Codex in the ChatGPT desktop app, /goal sets an objective. The progress row above the composer shows its status. The Goal text serves as both the first request and the criteria used to judge completion. You can edit, pause, resume, or clear it after creation. Typical uses include moving code, reorganizing its internal structure while preserving behavior, experiments, trial versions, and improvements measured against a score.[1][2]

Goal in Claude Code

In Claude Code, /goal <condition> sets a completion condition. After each turn, a separate small AI checks the condition and starts another turn when it is not yet satisfied.[3] One Goal can be active per session.[3] The goal also clears when the evaluator judges it unachievable or an error requires user intervention. Stopping alone does not prove completion; check the displayed status and the reason in the conversation.[3]

The evaluator does not read files or run commands. It judges only the information shown in the conversation, so Claude must report test results and verification output there.[3]

Setting /goal does not change the operations the AI is allowed to perform. An operation that is not already permitted still waits for human approval.[3]

Research and Plan Review with /plan

/plan asks the AI to prepare a plan before changes to documents or code begin. The AI gathers findings, options, work order, and verification methods for a person to review. It does not automatically decide what the task must achieve.

Plan in Codex

In Codex in the ChatGPT desktop app, /plan switches the active chat into Plan mode, a mode for considering a plan before changes to documents or code.[2]

The official reference describes its purpose as proposing an execution plan before changes to documents or code begin.[2] Provide the files, constraints, existing decisions, and open questions that the plan needs to address.

Plan in Claude Code

In Claude Code, /plan [description] enters Plan mode.[4] Claude can read files, run exploratory commands, and write a plan in this mode. It normally does not edit code files, and changes to documents or code begin only after the plan is approved and the session moves to the selected permission mode.[5]

The text-only command interface also supports Shift+Tab, while code editors and the desktop app provide a mode selector. A reviewer can request more planning or edit the proposed plan before approval.[5] In an interactive terminal session—a session controlled by typing text—where bypassPermissions—a mode that skips permission checks before an action—is available, however, Plan mode’s edit blocking is not enforced. Avoid that combination when Plan is intended to provide a safety boundary.[5]

Choosing a Command for Your Task

Check whether the method is settled and whether changes and checks must be repeated. The table shows how to choose for each situation.

StateRecommendationReason
Method and completion are clear, and one turn is enoughNormal requestA mode switch adds little value
Method is unresolved, and execution is not yet needed/planOptions and impact can be reviewed
Method is approved, and repeated changes and checks are needed/goalThe completion condition can persist across iterations
Method is unresolved, and execution will be long/plan → approval → /goalDesign decisions stay separate from sustained execution
Work restarts at a time or intervalA task set to run at a chosen time or intervalTime, rather than a plan or objective, triggers the next run
Work includes an action that cannot be undoneUse Plan and Goal for preparation; let a person executeThe human review boundary remains explicit
This table scrolls horizontally. Keyboard users can focus the table and use the left and right arrow keys.

Conditions for Tasks That Fit /goal

This article treats work as a /goal candidate when all six conditions below are met. This is the article’s decision checklist based on the documented behavior.

  1. It will not finish in one normal turn: The work repeats investigation, changes, and verification
  2. It has one objective: It does not combine unrelated requests
  3. Its end state is measurable: Tests, values showing whether a process succeeded or failed, counts, scores, or another artifact (a file, report, or other deliverable) can prove completion
  4. The verification is executable: The AI can access the required files, verification operations, and records of the work
  5. Intermediate decisions can be delegated: Progress does not require a person to decide product requirements or design direction every turn
  6. The run can be bounded: A turn, time, attempt, or change-scope limit can stop it

The central consideration is verifiability, not duration. Even a task that takes hours has an unstable stopping point if completion means only “make it good enough.” In contrast, a large workload becomes a stronger Goal candidate when the same tests can remain its success criterion. This is also the principle behind a self-healing loop for coding agents, where verification results drive repeated fixes.

Request Templates for Plan and Goal

Decisions, Constraints, and Verification in a Plan

A strong Plan separates investigation scope, decisions, options, verification, and approval points. Explicitly withholding changes to documents or code keeps the session focused on review.

/plan Investigate and plan how to achieve [objective]. Do not make changes yet.
Review [target files, sources, and specifications].
Show the selected approach, rejected alternatives and reasons, impact, and sequence.
Use [tests, review checks, or metrics] as acceptance criteria.
Separate [permissions, publication, deletion, or requirement decisions] as human checkpoints.
Do not resolve unknowns by assumption; list them as open questions in the plan.

Objectives, Completion Criteria, and Stop Conditions in a Goal

A strong Goal can be written with four elements: objective, verification, constraints, and stopping conditions. OpenAI’s long-running work guidance also recommends specifying the objective, protected scope, verification method, and stopping conditions.[1]

/goal Achieve [one objective].
Verify completion with [command, measured value, count, or completed document].
Preserve [protected scope, existing behavior, and permitted operations].
Stop and report when [a condition requiring human judgment] occurs.
Also stop at [a turn, time, or attempt limit].

When a plan file is involved, do not stop at “implement the contents of the plan file.” Keep the acceptance criteria in the Goal or in the plan itself. For work whose method is unsettled and whose execution involves repeated changes and checks, one option is to use /plan to settle the method, have a person confirm the scope, and then switch to /goal.

Limits for Continued Work and Conditions for Human Review

Using /goal does not expand what the agent is allowed to do. Codex uses a sandbox to restrict file and network access and an approval policy to determine when approval is required. Claude Code uses permission rules and related controls.[7][9] Check the product’s permission settings as well as the prohibitions in your request.

Set limits for cost and usage, the conversation and material supplied to the agent, and attempts or elapsed time. Check quality separately through tests or review.[6][8] For choosing an AI and detailed cost management, see enterprise AI coding cost management.

Stop for a person to decide whether to continue, revise the plan, or end the work when:

  • The plan’s assumptions, change scope, or acceptance criteria need to change
  • A usage, time, turn, or attempt limit is reached
  • Confidential data, an unapproved external service, or additional permission is needed
  • The next operation publishes, sends, purchases, deletes, updates data, or otherwise affects an external system
  • The specified number of checks fail and the cause cannot be identified

Exclude highly confidential work from autonomous continuation and define a human-controlled execution procedure during planning. Approving the plan does not approve every operation that might arise later. A person reviews the final changes and validation results.

Summary: /plan for Unsettled Methods, /goal for Repeated Work

Use /plan when the approach needs consideration, and /goal when changes and checks must continue under an approved approach. When combining them, a person approves the plan, reviews decisions when needed, and makes the final judgment after verification. Specify the completion criteria, protected scope, operations requiring approval, usage limits, and stopping conditions in the Goal.

A normal request is sufficient for work that finishes in one turn. Prioritize human judgment and control of execution for highly confidential work or when an operation with external effects is needed before the approach is settled.

This article is a general information summary and is not legal advice. Confirm practical decisions with a qualified specialist.

References

  1. OpenAI, Follow a goal, ChatGPT Use Cases
  2. OpenAI, Slash commands, ChatGPT Learn
  3. Anthropic, Keep Claude working toward a goal, Claude Code Docs
  4. Anthropic, Commands, Claude Code Docs
  5. Anthropic, Choose a permission mode, Claude Code Docs
  6. OpenAI, Cost optimization, OpenAI API Docs
  7. OpenAI, Agent approvals & security, ChatGPT Learn
  8. Anthropic, Manage costs effectively, Claude Code Docs
  9. Anthropic, Configure permissions, Claude Code Docs

For the latest releases and updates, check the official website and official documentation.