Back to library
AI
best practice

Use Goal Mode for Autonomous Long-Running Project Execution

Set an objective and let the AI finish the job autonomously.

Enable 'Goal Mode' in Codex to define a final outcome and success criteria, allowing the AI to work continuously toward the target without step-by-step prompting.

ChatGPT

The Scenario

You are migrating a large codebase or performing a deep data audit that involves hundreds of repetitive edits. Instead of asking for every single change, you want the AI to understand the finish line and get there on its own.

Before & after

The old way

Users typically manage long projects by prompting for one small step at a time and manually verifying each result before moving on. This 'babysitting' can take 2–3 hours of continuous attention.

With AI

By invoking 'Goal mode' in the Codex app or CLI, you set the target, and the AI works autonomously toward it, checking its own progress and success criteria. This reduces your active oversight time to about 2 minutes of setup.

The Prompt

Enable Goal Mode. My objective is: [DESCRIBE_FINAL_OUTCOME, E.G., MIGRATE THIS REPO TO TYPESCRIPT]. The success criteria are: [LIST_CRITERIA, E.G., ZERO LINT ERRORS AND ALL TESTS PASS]. Proceed until these goals are met.

Goal mode is designed for longer workflows where defines an outcome and success criteria, allowing Codex to work toward it across the app, IDE, and CLI.

Source

ChatGPT Business - Release Notes | OpenAI Help Center
"users can define an outcome and success criteria and let Codex keep working toward it."