Claude Code now has a /goal command that keeps a session moving until a completion condition is met. For developers, that turns a chatty assistant into something closer to a long-running worker.
Anthropic has added a new `/goal` command to Claude Code, giving users a way to set a completion condition and let the assistant keep working across turns until it reaches it. The documentation says the goal clears automatically once the condition is met, which matters because it changes Claude from a tool that waits for the next prompt into one that can carry a task forward with less hand-holding.
The feature sits inside Claude Code's broader push toward more durable agent workflows. According to the official docs, `/goal` is meant for substantial work with a verifiable end state, such as migrating code until every call site compiles, running through a backlog until it is empty, or finishing a design doc against its acceptance criteria. That framing is important. It is not about vague productivity theater. It is about giving the model a concrete finish line and a way to keep going until it can justify stopping.
The docs say one goal can be active per session, and that typing `/goal` followed by a condition starts the loop immediately. After each turn, a small fast model checks whether the condition is satisfied. If it is not, Claude starts another turn instead of returning control to the user. In other words, the model doing the work is not the same model deciding whether the work is finished, which gives the setup a basic evaluator layer.
That evaluator does not browse the filesystem or run commands on its own. It judges only what Claude has already surfaced in the conversation, so the completion condition has to be written in a way the transcript can prove. The docs recommend measurable end states, a stated check, and any constraints that matter, such as not modifying unrelated files. There is also a turn or time clause option, which makes sense for jobs that could otherwise drift indefinitely.
Claude Code's docs also position `/goal` alongside other autonomous workflows like `/loop`, Stop hooks and auto mode. The distinction is subtle but useful. `/loop` reruns on a time interval. Auto mode approves tool calls inside a turn. `/goal` is different because it keeps the session alive across turns until a model decides the stopping condition has been met. For teams already experimenting with agentic coding, that is a cleaner control surface than asking the model to guess when it should stop.
Why it matters
The feature arrives as Anthropic keeps expanding Claude Code's power and limits. Release notes on GitHub show `/goal` landing in Claude Code 2.1.139, alongside a new agent view for tracking sessions and a handful of workflow changes. A separate Anthropic post on May 4 said the company was doubling Claude Code's five-hour rate limits for paid plans, which suggests the company is trying to make longer, less supervised work feel normal rather than exceptional.
That is the larger story here. Most AI assistants are still optimized for discrete exchanges, a question, an answer, then another prompt if you want to continue. `/goal` pushes Claude Code toward a different model, one where the user defines the objective once and lets the system keep moving until it can defend a stopping point. For coding, that can mean fewer interruptions. For operators, it can mean better throughput on jobs that already have clear validation criteria.
There is also a practical trust angle. Anthropic says `/goal` runs only in workspaces where the trust dialog has been accepted, and it is unavailable if `disableAllHooks` is set in managed policy settings. That is not a footnote. It tells you the feature is being treated as part of the hooks system, which is exactly where something like this belongs if it is going to work reliably without turning into a black box.
The appeal is obvious, but so is the constraint. `/goal` is strongest when the end state is objective, testable and visible in the conversation. It is less useful when the finish line is fuzzy or the work depends on judgment that cannot be expressed cleanly. That is the real dividing line for autonomous AI right now. The systems that win are not the ones that sound most independent. They are the ones that know how to stop for the right reason.
Also read: A cup of water exposed the real economics of local AI hardware • Nadella testimony puts OpenAI governance under harsher scrutiny • Amazon's AI push shows how bad metrics can distort good tools