/goal
A slash command in Claude Code that has the AI execute a task repeatedly until a preset goal condition is satisfied; after each round, a separate small model determines whether the condition has been met.
Timeline (last 90 days)
/goal is a command in Claude Code for setting persistent session goals, allowing the top-level task description to be pinned throughout a long conversation and to remain visible after context compression.
All Facts (11)
用户可以在/goal的终点线条件中设置安全上限,如轮数限制或时间限制,以防止无限运行
85%Unverified要实现/goal的完全自主运行,需要开启自动批准(Auto-approve)模式,否则Claude会在每次操作时暂停等待确认
85%Unverified文章提出的五段式 /goal 模板包含目标、背景、范围、验收、交付五个部分,借鉴了软件工程中的用户故事和验收测试驱动开发(ATDD)的思想
85%Unverified/goal命令背后采用双智能体架构,同时运行两个AI智能体:一个负责执行任务(工人),另一个负责验证目标是否达成(老板)
80%Unverified传统AI编码助手通常是单轮交互模式,/goal命令引入了目标导向的持续循环机制
80%Unverified在/goal运行期间不带参数地再次输入/goal,会显示包含运行时长、已完成轮数和已消耗token数量的仪表盘
75%Unverified/goal 引入的持久目标状态本质上是 AI Agent 架构的核心组件之一,与 AutoGPT、LangChain Agent 等框架的设计理念一脉相承
75%UnverifiedTristen O'Brien曾因一个/goal任务耗光了一天的token额度
70%Unverified/goal命令中的老板智能体无法自行查看用户的文件,只能看到工人智能体汇报的内容
70%UnverifiedThe boss agent in the /goal command intervenes after each round of worker operations to review whether the goal has been achieved; if not, it initiates the next round.
60%Unverified/goal is a command in Claude Code for setting persistent session goals, allowing the top-level task description to be pinned throughout a long conversation and to remain visible after context compression.
50%