Skip to content
Agentic Levels
Start hereLevelsTracksPromptsAbout
Get my levelGet my level

  • Start hereYour first useful task with AI.
  • Level quiz8 questions. No AI needed.
  • Fluency ScoreYour Level and a score, from your own AI.

  • LevelsThe 11 levels, in order.
  • LessonsShort lessons, filter by level.
  • TracksGuided paths by tool, role or goal.
  • Set up your AI tool
  • Starter packFree files that help AI remember.

  • PromptsReady prompts to copy and adapt.
  • ChatGPT vs Claude vs GeminiPick the right one for the job.
  • How-tos
  • ReferenceCommands for Claude Code, Codex, Antigravity.
  • ResourcesHand-picked reading and tools.

  • Your progress
  • Your next moveAn interview that picks your next skill.
  • Your next lessonsThe next lessons at your level.
  • Updates

  • Pricing
  • About
  • FAQ & Feedback
  • Work with us
  • How we handle your data
Sign inPreferences
AboutPricingHow-tosPromptsStarter packMy stackHow we handle your data

© 2026 Fuentes Studio

PrivacyTermsRefundsAccessibilityAI content policyCredits
yourCouncil
Ready to help
✦

What do you want to understand?

Ask anything about what you're learning.

←Codex Fundamentals
  1. Tracks
  2. ›Codex Fundamentals: Module 5
  3. ›Set a goal Codex can finish
7

Level 7 · Lesson 11 of 12 · Free

Set a goal Codex can finish

Persistent objective, measurable proof, stop rule

After this, you'll be able to use Goal mode for long-running Codex work without letting the task drift.

Before you start

Complete Split work with subagents first.

The idea

Goal mode gives Codex a standing objective and a real definition of done. The goal text works as both the starting prompt and the finish line. Codex keeps checking its own progress against it.

Worked example

Before and after

Before: /goal Improve the app (Codex can't tell when it's done). After: /goal Make the gym's class signup form save email addresses. Finish only when the signup tests and npm run build pass, stop if it needs a database change or a new secret, and report after each failing test.

What the AI might say

Goal set. I'll work on the signup, run the tests after each edit, and report the checkpoint, the proof run, and what is left. I'll stop if it needs a database change.

Why it works

The After holds an outcome, proof, a stop rule, and a checkpoint. Codex can check its own progress against it.

Goal LoopMove through Set a goal Codex can finish, check proof, then fix only the weak part.
yesnorun it again
StartBegin with the real task
Set a goal Codex can finishAfter this, you'll be able to use Goal mode for long-running Codex work without
1Proof visible?The goal text includes outcome and proof
Ready to useWrite one /goal command with outcome, proof, checkpoints, and stop rule
Fix the weak partBreaks when the goal lacks completion criteria because Codex keeps making changes

Reach for /goal on work that takes many steps. It works in the desktop app, the terminal version and the IDE extension, but not in ChatGPT on the web.

Type /plan first to make Codex investigate and propose an approach before it edits. Then type /goal and your goal text.

Think moving a project to a new template, building a rough first version, a long cleanup pass, or anything that has to survive interruptions. Use /plan first when the goal still needs shape.

"Improve the app" tells Codex nothing. "Make the profile page save display names, pass npm test -- profile, pass npm run build, and stop if a schema change (a change to how data is stored) is required" gives it something to check against.

Goal mode isn't permission to stop supervising. You still set the checkpoints, the proof commands, and the stop conditions. A goal gives Codex no extra access: the same sandbox and approvals apply, and Codex pauses when it needs a decision.

In the app, a progress row above the message box has pause, resume, edit and clear. You can also ask in plain words, and ask for a short status report that names the checkpoint, the proof run, and what's left. To check it's still running, ask: Is the goal active, and what checkpoint are we at?

A long goal uses your plan's allowance too, and a run can stop at the five-hour limit, so set a checkpoint and pick the everyday model for long runs.

Each chat keeps its own goal, so don't let two chats edit the same files. On a Mac, a long goal stops if the computer sleeps, so turn on Prevent sleep while running.

In Claude Code and Antigravity: This track found no /goal command in Claude Code. Its plan mode is the closest match, because Claude writes a plan and makes no edits until you approve it. Antigravity's /teamwork runs a multi-day team of an orchestrator, workers and auditors on paid plans.

The goal should be specific enough that Codex can tell whether to keep going, stop, or come back to you.

Try it (14 min)

Paste this into Codex

Write the /goal text for one long Codex task of your own. You now know the parts, so there is no form this time. Check yourself against this list: the goal says what is true when done, names proof Codex can run or show, names when to stop and ask, and says when to report progress.

No long task of your own? Use the practice site, but know it is a small stand-in: a real goal is a many-step job such as moving every page of a site to a new template, with a checkpoint after each page. For practice, add an About page and a Contact page, each linked from index.html, with the lesson 2 check as proof and a stop if anything needs installing. If your AGENTS.md from lesson 3 says not to add files without asking, expect Codex to pause once, and approve the two new files. When the goal finishes, ask Codex: *Commit the goal's changes as "Add About and Contact pages".*

Return:
1. The exact /goal text.
2. The checkpoints Codex should report.
3. The proof required before completion.
4. The stop rule.

What a good response looks like

1. /goal Add an About page (about.html) and a Contact page (contact.html) to the practice site, and link both from index.html. Keep edits to those three files. After each page, run the check from lesson 2 and open the page in the built-in browser. Finish only when the check passes, both pages open, and both links work. Stop and ask me if you need to install anything, add a form that sends data, or change a file outside codex-practice. 2. Checkpoints: after about.html, after contact.html, after the links. Each report says what changed, what ran, and what is left. 3. Proof before completion: the check passes, both pages seen in the browser, both links clicked. 4. Stop rule: any install, any form, any file outside the folder.

Check yours against

  • The goal text includes outcome and proof
  • The stop rule names when Codex should pause
  • Checkpoints produce status, not vague reassurance
  • The goal does not hide decisions that need a human
  • Using Goal mode for a small task that one normal prompt can finish.
  • Writing a goal with no measurable proof.
  • Telling Codex to keep improving without a stop rule.
  • Letting a goal continue after the task needs product or policy judgment.

When this breaks

  • Breaks when the goal lacks completion criteria because Codex keeps making changes after the useful work is done.
  • Breaks when stop conditions are missing and Codex crosses into schema, billing, auth, or design decisions without approval.

AI can help with this

Use Codex to help you use Goal mode for long-running Codex work without letting the task drift. Start with the exercise prompt and your real input. Ask for one draft, then check it against this proof: The goal text includes outcome and proof. Accept only the version you can verify yourself.

You can now

✓

You can choose when Goal mode is appropriate

  • ✓You can write measurable completion criteria
  • ✓You can define checkpoint reports
  • ✓You can pause work at human-decision boundaries

Try it from memory

Pulling this out of your own head now is the part that actually moves it into long-term memory. Re-reading only feels like it does.

Without scrolling up, write a /goal for a long task of yours. Include everything Codex needs to know it is done.

One good answer: '/goal Move my podcast site's episode pages to the new template. Done when every page renders and the page test passes. Report after each batch of pages. Stop and ask if a page needs content I did not give.' Check yours: if a stranger could tell from the text alone when it is finished, you're there.

Key takeaways

Goal mode works when the goal contains the finish line. Give Codex outcome, proof, checkpoints, and a stop rule.

  1. 1Use /goal for long-running work with a durable objective.
  2. 2Use /plan first when the goal needs shaping.
  3. 3Goal text doubles as completion criteria.
  4. 4Pause or edit the goal when the work changes.

Go deeper

  • Codex Goal modelearn.chatgpt.com (opens in a new tab) ↗
Up nextHand off between local, IDE, and cloud→

Was this helpful?

Related lessons

Write a task brief Codex can finishRun the proof loopClose the self-improvement loop
← Back to Codex Fundamentals