Anthropic has launched /goals for Claude Code, changing a key part of how AI coding agents wrap up work. The model carrying out the task no longer gets to decide by itself whether the job is done. That check is handed to a separate model. The logic is simple: if the same AI writes the code and grades its own completion, the design is weak from the start.
Why coding agents stop too early
An AI coding agent usually runs in a loop: read files, execute commands, edit code, then decide whether the assignment is complete. The failure point sits in that last step. As the model accumulates context from completed actions, attempted fixes, and previous errors, it can drift into treating “I have done a lot of work” as “the task is finished.”
That gap can be expensive in enterprise settings. If a code migration or a test repair stops before the real end state is reached, teams may not notice the problem until days later.
One command, two distinct roles
With /goals, Anthropic separates execution from verification. A developer can define a concrete target such as all tests under test/auth must pass and lint results must be clean. Each time the agent attempts to stop, the evaluator model checks whether those conditions have actually been met.
By default, the evaluator uses Claude Haiku. Anthropic says the reason is straightforward: the evaluator only needs to make a binary call, either the conditions are satisfied or they are not, so a heavier reasoning model is unnecessary.
Verification stays inside Claude Code
If the evaluator finds the goal has not been reached, the agent keeps working. If the conditions are met, the evaluator records that result in the conversation history and clears the goal. Anthropic says the whole process runs inside Claude Code, without requiring a third-party observability platform or a custom logging setup.
The company’s documentation also outlines three elements for effective goal definitions: a measurable end state, such as test results, build exit codes, or a file count; a clear validation method, such as “npm test exits with code 0”; and constraints that must not change during execution, such as a rule that other test files cannot be modified.
Similar patterns exist, but usually as developer-built logic
The source notes that other frameworks have related approaches. OpenAI lets the agent decide when to stop and allows developers to connect external evaluators. Google ADK supports separate evaluation through LoopAgent, and LangGraph supports comparable patterns as well. The difference is that critic nodes and stop logic in those systems generally have to be designed by developers themselves. Anthropic has turned that structure into a native Claude Code command.

