Run long tasks in Codex using goals

Categories: AI, Product

Summary

Codex's new goal mode enables AI to work persistently on complex tasks for hours or days without interruption, with users reporting 100+ hours of continuous progress on single goals. Set clear, measurable objectives and Codex will self-correct until completion.

Key Takeaways

  1. Define goals with measurable targets or clear test criteria—Codex uses these benchmarks to determine task completion autonomously, making success quantifiable.
  2. Use /goal command to enable persistent mode across Codex app, IDE extension, and CLI—standardized syntax makes long-running tasks accessible across dev environments.
  3. Employ steering commands mid-task and side chats to redirect without interrupting main execution—allows course correction while preserving task continuity.
  4. Pause and resume goals across sessions to handle interruptions like connectivity loss—critical for long-running tasks spanning multiple days.
  5. Leverage Plan Mode first or ask Codex to interview you before setting goals—structured goal-crafting improves clarity and increases completion success rates.

Topics

Transcript Excerpt

Codex can now work more persistently towards your goals, whether it's for hours or even days. The goal functionality is now available in the Codex app, IDE extension, and the CLI. With it, you can specify a concrete goal to achieve, and Codex will continue to work until that goal has been met. Let me show you how it works. Start by typing /goal in your message composer to enable the goal mode. From there, we can define our goal for Codex. This will act as both the original message to have Codex start the task and as instructions to have it determine if the task has been completed. The best goals are those where it is clear whether Codex has actually achieved the goal or not. For example, by specifying a measurable target or having clear test criteria that have to pass. If you struggle writ…