Claude Code's /goals feature automates agent task evaluation

๐กStop your AI coding agents from quitting too early with Anthropic's new goal-based evaluation architecture.
โก 30-Second TL;DR
What Changed
Introduces a two-model architecture: one for execution and one for evaluation.
Why It Matters
This feature addresses a major pain point in production AI agents: premature task exit. It simplifies the development of reliable coding agents by standardizing the 'critic' node logic.
What To Do Next
Integrate '/goals' into your Claude Code workflow by defining specific, testable completion conditions to reduce agent 'hallucinated completion' errors.
Key Points
- โขIntroduces a two-model architecture: one for execution and one for evaluation.
- โขUses Haiku as a default evaluator to check if specific conditions are met before allowing task termination.
- โขEliminates the need for complex custom observability or third-party evaluation logic in agent loops.
- โขEnsures agents continue working until the defined goal condition is explicitly satisfied.
๐ง Deep Insight
Web-grounded analysis with 21 cited sources.
๐ Enhanced Key Takeaways
- โขThe
/goalsfeature, introduced in Claude Code version 2.1.139 in May 2026, transforms Claude Code from a conversational assistant into an autonomous agent capable of pursuing high-level objectives for extended periods without constant human intervention. - โขUnlike traditional single-turn prompts,
/goalsinitiates a persistent agentic loop where a separate, smaller, and faster model (Haiku by default) continuously evaluates a user-defined completion condition after each turn of the execution model, ensuring the task is explicitly satisfied before termination. - โขEffective
/goalprompts require a clear, measurable end state, a specific verification check (e.g., 'npm test exits 0'), and explicit constraints to guide the agent's autonomous operation. - โขThis feature is part of Anthropic's broader strategy to enhance 'Hands-Free Productivity' within Claude Code, complementing other tools like the 'Agent View' CLI dashboard for multi-session orchestration and background task execution.
- โขThe use of Haiku as the default evaluator leverages its speed and cost-efficiency, as Haiku 4.5 (released October 2025) offers near-frontier performance on coding and agent tasks at a significantly lower cost and faster speed than larger models.
๐ Competitor Analysisโธ Show
| Feature/Platform | Anthropic Claude Code (/goals)
{
"enrichedKeyPoints": [
"The /goals feature, introduced in Claude Code version 2.1.139 in May 2026, transforms Claude Code from a conversational assistant into an autonomous agent capable of pursuing high-level objectives for extended periods without constant human intervention.",
"Unlike traditional single-turn prompts, /goals initiates a persistent agentic loop where a separate, smaller, and faster model (Haiku by default) continuously evaluates a user-defined completion condition after each turn of the execution model, ensuring the task is explicitly satisfied before termination.",
"Effective /goal prompts require a clear, measurable end state, a specific verification check (e.g., 'npm test exits 0'), and explicit constraints to guide the agent's autonomous operation.",
"This feature is part of Anthropic's broader strategy to enhance 'Hands-Free Productivity' within Claude Code, complementing other tools like the 'Agent View' CLI dashboard for multi-session orchestration and background task execution.",
"The use of Haiku as the default evaluator leverages its speed and cost-efficiency, as Haiku 4.5 (released October 2025) offers near-frontier performance on coding and agent tasks at a significantly lower cost and faster speed than larger models."
],
"competitorAnalysis": "| Feature/Platform | Anthropic Claude Code (/goals) | OpenAI (General Approach) | LangGraph / Google ADK | MLflow (Evaluation Platform) | Galileo (Agent Reliability Platform) |
|---|---|---|---|---|---|
| Core Approach | Two-model architecture (execution + dedicated Haiku evaluator) for automated task completion verification. | Model decides when it's done; allows user-defined evaluators to be tagged on. | Independent evaluation possible but requires developers to define critic node, termination logic, and observability. | Complete evaluation platform; LLM judge evaluates full execution traces (tool calls, reasoning, planning). | AI agent reliability platform; 'eval-to-guardrail lifecycle' with Luna-2 (purpose-built small LLMs for evaluation). |
| Evaluation Model | Haiku (default), a smaller, faster, cost-efficient model. | Relies on the primary execution model or user-provided evaluators. | Requires developer to define and configure the critic model/logic. | Uses LLM judges and integrates with other eval libraries (Ragas, DeepEval). | Luna-2 (3B and 8B parameter variants), purpose-built small LLMs for evaluation. |
| Task Termination | Agent continues until explicit goal condition is met by evaluator. Prevents premature termination. | Model-driven termination; can lead to premature exits if not carefully managed. | Developer-defined termination logic. | Focuses on evaluating the entire execution trace, not just termination. | Aims to prevent failure modes like incorrect tool paths or behavioral drift through continuous evaluation. |
| Ease of Use for Evaluation | One-line command for goal definition; default independent evaluator. | Requires custom observability or third-party evaluation logic for robust checks. | Requires significant developer effort to set up evaluation and termination logic. | Comprehensive but requires integration into existing workflows. | Provides pre-built evaluators and auto-tuning, but initial setup for Luna distillation. |
| Pricing Model | Subscription plans (Pro, Max) or pay-per-token API. Haiku is cost-efficient. | Typically pay-per-token API. | Varies by underlying LLM and platform. | Varies by platform/tool; often open-source components with enterprise offerings. | Enterprise features require paid tiers. |
| Key Use Cases | Autonomous coding tasks, multi-step development, hands-free productivity. | General LLM applications, custom agent development. | Agent orchestration, complex multi-step tasks. | Agent development loop, tracing, prompt optimization, CI/CD integration. | End-to-end agent evaluation, simulation, observability, guardrails for multi-agent systems. |
๐ ๏ธ Technical Deep Dive
- The
/goalsfeature implements a two-model architecture: a primary model handles task execution (e.g., coding, running commands), while a secondary, typically smaller and faster model (Haiku by default), acts as an independent evaluator. - The evaluation model continuously checks a user-defined completion condition after each 'turn' or step of the execution model. If the condition is not met, the execution agent is instructed to continue working.
- This mechanism prevents the execution agent from prematurely terminating a task or 'reward hacking' by ensuring the defined goal is explicitly and verifiably satisfied.
- Users define the goal condition using a 'four-piece set' which includes the End Goal, Verification criteria, Constraints, and an optional Turn Limit.
- Claude Code itself functions as a terminal-based agentic coding tool, capable of interacting with the development environment by reading/writing files, executing shell commands, running tests, and performing web searches.
- Haiku 4.5, a model often used for evaluation, supports a 200,000 token context window and incorporates advanced capabilities such as 'extended thinking,' 'computer use,' and 'context awareness,' making it efficient for agentic workflows.
๐ฎ Future ImplicationsAI analysis grounded in cited sources
โณ Timeline
๐ Sources (21)
Factual claims are grounded in the sources below. Forward-looking analysis is AI-generated interpretation.
- Google Search Source
- Google Search Source
- Google Search Source
- Google Search Source
- Google Search Source
- Google Search Source
- Google Search Source
- Google Search Source
- Google Search Source
- Google Search Source
- Google Search Source
- Google Search Source
- Google Search Source
- Google Search Source
- Google Search Source
- Google Search Source
- Google Search Source
- Google Search Source
- Google Search Source
- Google Search Source
- Google Search Source
Weekly AI Recap
Read this week's curated digest of top AI events โ
๐Related Updates
AI-curated news aggregator. All content rights belong to original publishers.
Original source: VentureBeat โ

