Parallel research, planning, and isolated experimentation — v5 柱 G (shipped v0.6.0).
并行调研、起方案、隔离试方案——v5 柱 G(v0.6.0 已 ship)。
seek's main agent runs your conversation in one thread. When a task needs parallel work (read 50 files at once, propose three approaches simultaneously, try a refactor in isolation), the model spawns subagents — each with its own session, its own token budget, optionally its own git worktree. Results condense into a single summary fed back to the parent.
seek 的主 agent 在一个线程里跑你的对话。需要并行工作时(一次读 50 个文件、同时起 3 个方案、隔离试一次 refactor),模型派生子代理——各自独立 session、独立 token 账户,可选独立 git worktree。结果浓缩成单个 summary 回到父。
Three concrete problems the parent agent can't solve on its own:
父 agent 单线程解决不了三件事:
parent agent ├─→ subagent · explore → read 3 directories → summary ├─→ subagent · plan → draft an approach → summary └─→ subagent · worktree → try refactor in isolation → summary │ ▼ father reads summaries → continues conversation
The model spawns subagents through the agent tool; worktree isolation is opt-in via enter_worktree / exit_worktree:
模型通过 agent 工具派生子代理;worktree 隔离通过 enter_worktree / exit_worktree 选用:
| Tool | 工具 | Purpose | 用途 |
|---|---|---|---|
| agent | Spawn a subagent (explore / plan / general-purpose). Returns a single summary. ReadOnly-marked → multiple agent calls in one assistant turn dispatch in parallel. | 派生子代理(explore / plan / general-purpose)。返回单个 summary。标 ReadOnly → 一轮多个 agent 调用并行分派。 | |
| enter_worktree | Create an isolated git worktree under ~/.seek/projects/<pid>/worktrees/<id>. Subsequent edits go there, not your working tree. | 在 ~/.seek/projects/<pid>/worktrees/<id> 创建隔离 worktree。后续编辑在那里发生,不动你的工作树。 | |
| exit_worktree | Leave the worktree. Disposition: discard (default; stashed to refs/seek/discarded/<ts> for accidental-recovery), keep (file stays for later inspection), merge (manual — model prints suggested commands). | 离开 worktree。处置:discard(默认;stash 到 refs/seek/discarded/<ts> 防误删)、keep(保留待后续检查)、merge(手动——模型打印推荐命令)。 |
$ seek > /agents # TUI panel: live + completed subagents > /worktrees # TUI panel: seek-managed git worktrees $ seek worktree list # CLI: same data as /worktrees $ seek worktree gc # reap orphans from crashed sessions
PrefYolo parent can spawn PrefAsk child; the reverse never happens. PlanAnalyze parent forces all children to PlanAnalyze (no escape via spawn).PrefYolo 父可以派生 PrefAsk 子;反向永不发生。PlanAnalyze 父强制所有子也是 PlanAnalyze(spawn 不能绕过)。cache.Tracker.AdoptChild. No hidden bill.cache.Tracker.AdoptChild 累加到父状态栏。无隐藏账单。AdoptChild panics if called on a child with children.AdoptChild 在子已有 children 时 panic。../outside paths and absolute paths still resolve normally). Don't run untrusted code in a worktree expecting containment.../outside 和绝对路径仍正常解析)。别在 worktree 里跑不可信代码当沙箱。| Path | 路径 | Contents | 内容 |
|---|---|---|---|
~/.seek/projects/<pid>/sessions/<sid>/subagents/<sub-sid>/transcript.jsonl | Subagent full message history — resumable via seek -resume <sub-sid>. | 子代理完整消息历史——可通过 seek -resume <sub-sid> 续传。 | |
~/.seek/projects/<pid>/sessions/<sid>/subagents.jsonl | Per-parent-session subagent index (started/completed/failed/orphaned events) — drives /agents rendering. | 每个父 session 的子代理索引(started/completed/failed/orphaned 事件)——驱动 /agents 渲染。 | |
~/.seek/projects/<pid>/worktrees/<wt-id>/ | Active worktree filesystem (per git worktree add). | 活跃 worktree 文件系统(由 git worktree add 创建)。 | |
refs/seek/discarded/<timestamp> | Git ref where exit_worktree if_dirty=discard stashes work for accidental-recovery (not in default refspec; GC'd by seek worktree gc). | exit_worktree if_dirty=discard 时 stash 到这里防误删(不在默认 refspec 中;由 seek worktree gc 清理)。 |
[agent: failed reason=too_many_subagents]; the parent model decides whether to retry or switch strategy.[agent: failed reason=too_many_subagents];父模型自行决定 retry 或换策略。MaxTurns (default 200). Exhaustion → [agent: failed reason=max_turns_exceeded].MaxTurns(默认 200)。耗尽 → [agent: failed reason=max_turns_exceeded]。