AI Field Guide
Claude Code commands

/goal

Updated 2026-06-03

Questions this answers

  • My AI agent stalls and I have to keep coming back to it
  • How do I run my AI agent overnight
  • My AI agent keeps asking me to confirm before proceeding
  • My AI agent stops before my thing works

The Fix

Type /goal in Claude Code or Codex, then describe what "done" looks like. For example, "/goal the whole report is drafted and every section has a chart." Claude or Codex starts working right away, and instead of stopping after each step to ask "what now?", it checks its own work, keeps going, and only comes back to you once it's actually finished (or you tell it to stop with /goal clear).

When to Use It

Use /goal on bigger tasks that have a clear finish line: working through a long to-do list, cleaning up a messy document, anything where you'd otherwise be babysitting it and typing "keep going" over and over. Skip it for quick one-off asks or anything where you can't really say what "finished" looks like.

In the Wild

Building a complex video game using /goal

The best use case I’ve seen so far from /goal - lady has excess on her farm - tells codex to sell it - codex sells it

Shanee Moret
Shanee Moret
@theshaneemoret

Been helping a handful of business owners with AI implementation. One of them has a side business for fun because she lives on a farm where she sells Dahlia tubers. She had 300 left to sell. To test Codex /goal mode we gave codex a goal to sell 200 Dahlia tubers for Mother's Day.

Image
Reply

/goal enabled selling flowers for a local farm until the entire inventory was sold

Best Practices