Claude Code /goal
The /goal command in Claude Code sets a completion condition that keeps Claude working autonomously across multiple turns until that condition is met.
After you type /goal followed by your desired end state (like "all tests pass" or "build exits 0"), a small fast model checks after each turn whether the condition holds.
If not, Claude automatically starts another turn without waiting for you to prompt it, effectively creating a persistent loop—plan, act, test, review—until your goal is verifiably complete.
This transforms Claude from responding to individual prompts into an autonomous agent that can work on substantial tasks with measurable outcomes, like migrating code until tests pass or refactoring until the build succeeds.
3
6 comments
Matthew Sutherland
6
Claude Code /goal
powered by
AI for Life
skool.com/ai-for-life-3967
Practical AI training for work and life. Hands-on lessons with Claude,
ChatGPT, and automation tools. Built for people ready to use AI.
Build your own community
Bring people together around your passion and get paid.
Powered by