agent-team-run reference

agent-team-run は、親 Issue に紐づく sub-issue 群を review-orchestrator agent-team queue の parent-assisted queue runner で実行する入口である。 plan 生成、queue 初期化、dispatch 前 checkpoint、runtime 別 worker dispatch、response / ingest / status loop、optional integration、artifact ベース完了報告までを扱う。

queue 状態、worker gate、artifact 検証、entry の next action は review-orchestrator agent-team queue subcommand 群の stdout JSON と artifact を source of truth とする。 worker の自然言語 summary だけで成功扱いにしない。

Target

親 Issue 1 件を対象にする。 親 Issue には sub-issue が紐づいており、worker Issue が単独で worker PR または branch / commit / push まで進められる粒度で分割されている必要がある。

通常の Issue 作成、github-issue-breakdown 後の handoff、fix-github-issue の内部処理から自動起動しない。 ユーザーが明示的に /agent-team-run を指定した場合だけ使う。 fix-github-issue / implement-from-planworktree=on|off は単一実装 flow の作業場所 option であり、agent team queue の --worktree-root とは別物である。

Options

引数 既定 意味
<親Issue番号/URL> 必須 sub-issue 群を持つ親 Issue
pr=draft draft worker は draft PR を作成する
pr=create draft worker は通常 PR を作成する
pr=none draft worker は branch 作成、commit、push まで行い PR は作成しない
runtime=auto auto 実行中 runtime を使う。Codex runtime では codex、Claude Code runtime では claude として扱う
runtime=codex auto Codex subagent で worker request を処理する
runtime=claude auto Claude Code Agent tool で worker request を処理する
auto-merge off 成功した issue worker PR を coordinator が自動 merge する
max-workers=3 3 1 回の dispatch で発行する ready worker の上限
worker-timeout=45m 45m worker response deadline
integration=on on queue plan --integration を付け、issue worker 完了後に integration worker を実行する
integration=off on integration entry を plan に含めず、issue worker の done / blocked だけで run を閉じる
integration-validation-command=<cmd> なし integration=on の時だけ queue plan --integration-validation-command として渡す。複数指定可
dry-run off plan、init、status、checkpoint 提示までで dispatch しない
yes off dispatch 前のユーザー確認 checkpoint を skip する

integration=on|off は plan に integration entry を含めるかどうかの写像である。 integration=off では integration phase を実行せず、完了報告にも integration 結果を含めない。 integration-validation-command は指定された値だけ渡し、未指定時に検証 command を推測で補完しない。 worker-timeout は skill 側の default として 45m に解決し、未指定でも dispatch 時に --worker-timeout 45m を渡す。 prruntimemax-workersworker-timeout、default branch は dispatch 前 checkpoint までに解決し、queue command には解決済みの PR_MODERUNTIMEMAX_WORKERSWORKER_TIMEOUTDEFAULT_BRANCH を渡す。 RUN_ID は queue init 前に agent-team-$(date -u +%Y%m%dT%H%M%SZ)-$(git rev-parse --short HEAD) のように一意に決め、dispatch stdout JSON は tmp/agent-team/RUN_ID/dispatch.json に保存して pending_requests[] の source にする。 dispatch stdout が返す absolute queue_path / request_path / worktree_path は、以降の respond / ingest でもそのまま使う。 relative --queue と absolute request/worktree path を混在させると path validation が失敗する場合がある。 dry-runqueue status に基づく dispatch 前 checkpoint と同じ項目を提示し、ユーザー確認を挟まず dispatch せずに終了する。

Stopping Combinations

組み合わせ 停止理由
pr=none auto-merge PR を作成しないため merge 対象が存在しない
integration=off integration-validation-command=... integration worker を作らないため validation command の消費先がない
runtime=auto が解決不能 worker dispatch 手段を決定できない
max-workers が 1 未満 ready worker を発行できない
worker-timeout が解釈不能 response deadline を決定できない

Completion Conditions

完了報告は queue artifact と ingest 結果に基づく。 最低限、次を確認する。

Live E2E Notes

Examples

入力 動作
/agent-team-run 724 default の draft PR、runtime auto、integration on、max-workers 3 で checkpoint 後に実行する
/agent-team-run 724 pr=create runtime=codex max-workers=2 Codex subagent で最大 2 worker ずつ通常 PR 作成 mode で実行する
/agent-team-run 724 pr=none integration=off yes PR なしで worker branch を push し、integration なし、checkpoint 確認を skip して実行する
/agent-team-run 724 auto-merge integration-validation-command="go test ./..." yes issue worker PR の自動 merge を opt-in し、integration validation command を plan に渡す
/agent-team-run 724 dry-run plan / init / status / checkpoint 表示までで dispatch しない