I have had my battles with this feature for a while before getting good results.
In my opinion, it is a good example of why simply typing a command does not do justice to the complexity needed to make it work well.
Summary
Clear, verifiable goals
Define the goal as an exit criterion, not just an initial prompt.
Use measurable targets where possible, such as percentages, parity, or performance thresholds.
You can start without /goal, brainstorm first, then let Codex set or refine the goal.
Give Codex useful guidance
Point Codex toward likely problem areas, tools, constraints, and acceptable approaches.
Without guidance, Codex may find creative solutions but also waste time.
A plan file can help Codex work from researched options.
Make progress measurable
Codex needs tools or metrics to understand whether it is getting closer.
For ambiguous tasks, create evals, visual diffs, benchmarks, or other measurement tools.
Guard against false success, such as passing tests by reducing coverage.
Use a realistic environment
Codex needs an environment close to production for meaningful results.
Deployment, latency, and performance work should use realistic flags, data, stack, and logs.
For UI or app performance, testing on the real application or device can matter.
Be careful with visual goals
“Pixel perfect” goals can cause Codex to focus on the wrong details.
Images are useful context, but should not be the only completion criterion.
Prefer specs, checklists, and design-system adherence as clearer success criteria.
Track long-running progress
Ask Codex to commit meaningful steps and push to a draft PR.
Use artifacts such as markdown files, HTML pages, graphs, or reports to track work.
Use side chats or separate status checks to inspect progress without interrupting the goal.
Clean up before finalizing
Review the work after the goal is reached, especially for optimization tasks.
Codex may leave behind failed attempts or unnecessary changes.
Use /review or a deeper reflection pass before handing results to others.