HomeVideos

Run long tasks in Codex using goals

Now Playing

Run long tasks in Codex using goals

Transcript

33 segments

0:00

Codex can now work more persistently towards your goals,

0:02

whether it's for hours or even days.

0:05

The goal functionality is now available in the Codex app,

0:08

IDE extension, and the CLI.

0:10

With it, you can specify a concrete goal to achieve,

0:12

and Codex will continue to work until that goal has been met.

0:16

Let me show you how it works.

0:17

Start by typing /goal in your message composer to enable the goal mode.

0:22

From there, we can define our goal for Codex.

0:24

This will act as both the original message to have Codex start the task and as

0:28

instructions to have it determine if the task has been completed.

0:31

The best goals are those where it is clear whether Codex has actually achieved

0:35

the goal or not. For example, by specifying a measurable target or having

0:38

clear test criteria that have to pass.

0:40

If you struggle writing the goal yourself,

0:42

you can ask Codex to help. Either by using Plan Mode first before using the

0:47

resulting plan as your implementation goal,

0:49

or by just asking Codex to interview you before crafting the goal and then

0:53

having it set the goal itself.

0:55

Once Codex is up and running, you can continue to use steering to send

0:58

additional messages, for example, to have Codex correct course.

1:01

You can also start side chats to understand the work done so far

1:05

without having to interrupt the main task.

1:07

Because Codex might take hours or even days,

1:10

you can also pause and resume your goal later on.

1:12

This is helpful, for example, when you're about to head out of the office and

1:15

your laptop is about to lose internet connection.

1:17

Once you're ready to continue, you can resume the goal or even edit it if your

1:21

goal has changed or if you want to give Codex more concrete guidance.

1:25

Using goals in Codex is incredibly powerful.

1:27

We've seen many people have Codex make progress on complicated tasks for

1:31

upwards of 100 hours on a single goal.

1:33

So give it a try.

Interactive Summary

Codex has introduced a persistent goal functionality that allows the AI to work autonomously on tasks for extended periods, from hours to days. Users can define clear, measurable objectives, utilize planning tools to refine these goals, and maintain control through steering and side chats. The feature also supports pausing and resuming tasks, making it a robust solution for complex, long-term development work.

Suggested questions

3 ready-made prompts