When we hand a task to Codex, we usually already have an objective in mind. If the AI can't do it, we have to keep fixing it ourselves, still have to worry about it, and sometimes get absolutely furious at it. Is there a way to just tell the AI the task and the final result we want, and then wait for it to get things done?

Yes—that's the recently updated pursue-objective feature, the Goal command.

What Is the Goal Command?

You can think of it as handing the project to a "contractor" Agent. You only need to tell it what to do and what capabilities the project needs—these are the objectives. The "contractor" hands the task to the implementation Agent and continuously checks on progress; as long as the objectives haven't been met, it keeps pushing forward until they are.

This is a test-driven approach that essentially hands the supervisory work around a defined objective over to the AI.

How to Enable It

Very simple—remember how to enable Plan Mode? It's the same: just enable it right below Plan Mode.

开启 Goal 模式

Things to Note

One thing to note: precisely because it uses this supervisory approach, the Goal command consumes a large amount of Tokens and is a relatively "luxurious" way to work. It suits large, complex tasks—for example, deeply researching and recreating a large open-source project—but not simple small tasks or minor requirements; otherwise it's not only slow but also uneconomical.

Real-World Use Case Sharing

I have used the Goal command to optimize image-generation prompts or reverse-engineer prompts. As far as I know, prompt optimization and tuning is the most common and most suitable use of loop engineering like the Goal command. If you're interested, check out this article:https://doc.niallspace.com/ai/posts/loop-engineering-prompt-optimization-with-fantuan-skill

Next Steps

Now with the Goal command, the AI can keep pushing a task forward around an objective. But there are still many repetitive scheduled tasks left unsolved. For example, every night at 9 p.m., I want the AI to automatically commit changes in various Git repositories and push them to the corresponding GitHub repositories; right now I can only do it manually. Is there a way to solve this?