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
Anthropic Updates Claude Code With Goal Command for Autonomous Engineering Workflows
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
1kretweets14klikes
View on XStill 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.


