Anthropic Updates Claude Code With Goal Command for Autonomous Engineering Workflows

AnthropicAnthropic

· Updated

Anthropic released the /goal command for Claude Code, allowing developers to set specific completion conditions that the agent pursues autonomously across multiple turns. This update shifts the developer's role from iterative prompting to high-level supervision, enabling the AI to handle complex migrations without human intervention between steps.

Anthropic launched the /goal command for Claude Code, its terminal-based agentic coding tool. The feature allows users to define a verifiable end state—like passing a test suite—which the agent pursues across multiple turns without human prompting. This follows recent reliability hardening for Claude Code.

This update addresses the "human-in-the-loop" bottleneck by using a secondary evaluator model to gate the agent loop. After each turn, a small fast model (a lightweight AI optimized for speed) checks the transcript against the goal. This mirrors OpenAI's Codex goal command, signaling that autonomous persistence is now a standard.

You can now automate long-running tasks like API migrations by setting a condition and enabling auto mode. Goals persist across sessions via the --resume flag and can be bounded by turn limits to prevent infinite loops. The feature is available now for all Claude Code users.

ClaudeDevs
ClaudeDevs
@ClaudeDevs
X

How do you keep Claude working until the job is done? Claude Code helps with this in a few ways, including one we shipped recently: /goal. https://t.co/QtVPmwoKct

1kretweets14klikes
View on X

Still wondering? A few quick answers below.

The /goal command is a feature in Claude Code that allows you to set a specific completion condition for a task. Once set, Claude continues working across multiple turns until a secondary model confirms the condition is met. This is useful for long-running engineering tasks like migrations or fixing a backlog of issues.

After each turn, Claude Code sends the conversation transcript to a small fast model, which is a lightweight AI optimized for speed. This evaluator model determines if the goal condition has been satisfied. If the condition is not met, the evaluator provides a reason that guides Claude in the next autonomous turn.

Yes, the /goal command is designed to work with auto mode, which is a setting that approves tool calls automatically. While /goal removes the need for per-turn prompts, auto mode removes the need for per-tool prompts. Together, they allow Claude Code to work toward a verifiable end state entirely unattended.

Active goals are saved at the session level and can be restored using the resume or continue flags when restarting a terminal session. While the condition carries over, the turn count and token spend baseline reset upon resumption. Goals that were already achieved or cleared manually are not restored.

The /goal command stops only when a model confirms a specific condition is met, such as a test suite passing. In contrast, the /loop command runs a prompt repeatedly based on a set time interval. Use /goal for tasks with a measurable end state, which is a verifiable result like a passing test.

Every HeadsUpAI update is written based on its original source and reviewed before it's published. Read our editorial standards →

Share this update