How to Use /goal in Codex CLI for Long Tasks

How to Use /goal in Codex CLI for Long Tasks

The /goal feature is useful when a task is too long for one quick instruction.

It gives Codex a clear finish line.

Use it when the job has an end state

A good goal is concrete.

For example: fix the bug, publish the article, verify the page, or finish the migration.

A vague goal is weaker. “Improve this” is harder to complete than “make this page pass the visual check.”

Keep the goal small enough

A goal should be meaningful, but not endless.

If the work has many separate parts, split it. Finish one goal, then set the next.

Check progress against the goal

The useful question is simple: are we closer to done?

That keeps the session focused when many side issues appear.

My rule

Use /goal when you want Codex to carry context across a longer job and finish cleanly.

Original Japanese Article

This article is based on the Japanese post: Codex CLIの /goal の使い方。長い作業を「終わるまで進める」新機能.

attrip

attrip

Turning thoughts into articles, AI workflows, and music.

Writing about bonsai, music, blogging, and everyday experiments.

Publishing since 2010

Leave a Reply