EN 中文

Goal runs seek unattended across multiple turns toward a completion CONDITION. A cheap DeepSeek model judges after each turn whether the condition is satisfied. Use it for tasks like "fix all TODOs", "run test suite green", or "migrate all API calls".

Goal 让 seek 自动多轮工作直到某个条件满足。适合"改完所有 TODO"、"跑通所有测试"、"迁移完这个目录的 API 调用"这类长时间任务。

Quick Start

快速开始

$ /goal 修复 internal/bgjob/ 下所有测试           # TUI
$ seek goal run "把 docs/ 下所有 .md 中的 V3 改为 V4"  # CLI

How It Works

工作方式

  1. You set a condition — e.g. "fix all lint errors"
  2. 你给一个"完成条件"(condition)
  3. The agent works autonomously — reading, editing, running commands
  4. agent 每轮自主调用工具
  5. A cheap judge model (DeepSeek) checks if the condition is met after each turn
  6. 一个廉价模型(DeepSeek)每轮判断条件是否满足
  7. The run stops when: met / max_turns / timeout / stalled / token_budget / canceled / error
  8. 满足停止条件时终止

Stop Reasons

终止原因

Reason 原因 Description 说明
metJudge confirmed condition satisfied判定条件已满足
max_turnsReached turn cap (default 25)达到轮数上限
timeoutWall-clock timeout超时
stalledNo progress for N turns (default 3)连续多轮无进展
token_budgetToken budget exhaustedTokens 预算耗尽
canceledUser canceled (Esc / SIGINT)用户取消
errorA turn execution failed某轮执行出错

Safety Boundaries

安全边界

Note: these protections apply only to the unattended paths (seek goal run and cron --goal). The TUI /goal uses your current permission posture — Ask prompts fire normally and remote push is not auto-blocked (you are present to supervise).

注意:以下保护只在无人值守路径(seek goal runcron --goal)启用。TUI 里的 /goal 走你当前的权限姿态——Ask 模式会逐次弹确认,push 也不会被自动拦(你在旁边,由你把关)。

In unattended mode (goal run / cron), seek automatically enables these protections:

无人值守时(goal run / cron),自动启用以下保护:

Remote-mutating commands (git push, gh pr, gh api, etc.) are blocked even in yolo mode during an unattended goal run.

TUI Usage

TUI 使用

$ /goal <condition>

CLI Reference

CLI 参考

$ seek goal run "<condition>"  # Unattended run until condition met

Caps (code defaults — no CLI / env switches yet)

上限参数(当前为内置默认,暂无 CLI / 环境变量开关)

Param 参数 Default 默认 Description 说明
Max turns25Stops with max_turns reason达到后以 max_turns 停止
Stall limit3N turns with no tool calls → stalled连续 N 轮无工具调用时停止
Timeout30 min (headless goal run); none (TUI /goal)headless goal run 30 分钟;TUI /goal 无Stops with timeout reason到点以 timeout 停止
Token budgetNoneReserved — no tracker wired yet预留(接入需 tracker,见 PRD 后续项)

Goal vs Autopilot

Goal 与 Autopilot 的区别

Goal Goal Autopilot Autopilot
Architecture架构 Single agent, same conversation, multiple turns 单 agent,同一对话多轮 Multiple agents, isolated worktrees, parallel 多 agent,独立 worktree 并行
Use case适用场景 Linear tasks (edit → compile → test) 线性任务(改代码 → 编译 → 测试) Exploratory (parallel experiments) 探索性任务(多方案并行实验)
Isolation隔离 Same workspace 同一工作区 Per-agent worktree 每个 subagent 独立 worktree
Judge判決器 Cheap DeepSeek call per turn DeepSeek 廉价模型每轮判断 Orchestrator aggregates results 由 orchestrator 汇总结果

See Also

相关功能