Recover initial, terminal, and commit-uncertain subagent failures safely
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 30/100
- issue の種類
- 機能追加
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- rust
調査の方向性
Start with src/tools/subagent.rs, focusing on Subagents::prompt, initial creation, and terminal classification; then review the regression coverage in src/tools/subagent/tests.rs and the possible-effects dependency in #48. Define recovery separately for initial and follow-up failures, preserving live-child reuse while rejecting unsafe or unknown states. Done means the listed failure, cancellation, generation, handle, and diagnostic-privacy cases are covered by tests.
索引モデルが issue の本文から書いたものです。
説明
Summary
Initial subagent() failures and terminal or commit-uncertain follow-up prompt() failures still need explicit, safe recovery. Recovery must distinguish a known reusable live child from an unusable session or unknown remote/durable completion state.
Already implemented
The original report said every unsuccessful dispatched follow-up removed its logical subagent. That is no longer universally true. #56 (ceb727e; shipped in v0.1.114) added regression coverage in src/tools/subagent/tests.rs: reusable_prompt_failure_remains_failed_idle_and_can_be_retried. A nonterminal refusal from a still-live child leaves the roster Idle with a Failed outcome; the prior successful handle can be explicitly prompted again, and the next success advances generation correctly. This does not establish that arbitrary transport failures or repeated effectful prompts are safe to retry.
Remaining acceptance criteria
- Cover both initial
subagent()failures (which may return no successful handle) and follow-upprompt()failures. - Use the provider-independent possible-effects metadata from #48 to distinguish confirmed pre-output/pre-tool failures from assistant output, emitted tool calls, started/completed tool execution, and unknown/unconfirmed state. Absence of evidence is not proof of no effects.
- Define an explicit recovery path for terminal/lost-child failures when safe recovery is established; reconcile durable/remote completion and handle generations, or restart from a known completed snapshot. Never blindly replay a possibly effectful turn. Unknown effects or commit status must yield an actionable conservative failure rather than silently recovering.
- Preserve existing live-child nonterminal follow-up reuse; distinguish it from terminal failure, cancellation, and transport loss. Reject stale handles and prevent concurrent generation corruption.
- Test initial failure, terminal follow-up failure, uncertain transport/completion, safe pre-effect recovery, failures after output/tool activity, cancellation, and generation/handle invariants. Ensure diagnostics expose no private prompts, tool arguments/results, or provider payloads.
Dependency and historical context
Depends on #48 for conservative possible-effects evidence; #48 owns diagnostic facts, this issue owns recovery/reusable-session policy. The #35 follow-up explicitly expanded scope to both initial and follow-up failures: https://github.com/speakeasy-api/kit/issues/21#issuecomment-5458466104.
The original retirement rule avoided continuing from a potentially changed transcript after dispatch. Preserve that safety goal while improving recovery. Relevant implementation: src/tools/subagent.rs (Subagents::prompt, initial creation, and terminal classification). The historical resolved trigger remains documented in the subagent keepalive note.
- 主要言語
- Rust
- スター
- 43
- フォーク
- 5
- 平均マージ
- 13時間 56分
- マージ済み PR(30日)
- 65
環境構築
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートなし
- コントリビューションガイドなし
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
speakeasy-api/kit のほかの issue
-
enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
speakeasy-api/kit#175 ·
メンテナーはふだん 1 日以内に返信
-
enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
speakeasy-api/kit#165 ·
メンテナーはふだん 1 日以内に返信
-
enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
speakeasy-api/kit#151 ·
メンテナーはふだん 1 日以内に返信
-
enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
speakeasy-api/kit#149 ·
メンテナーはふだん 1 日以内に返信
-
enhancement
難易度 1/5 1時間未満 初心者へのやさしさ 84/100
speakeasy-api/kit#148 ·
メンテナーはふだん 1 日以内に返信
speakeasy-api/kit の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
project-robius/robrix#1154 ·
メンテナーはふだん 1 日以内に返信
-
Add Mimirオープン
難易度 1/5 1時間未満 初心者へのやさしさ 78/100
slavakurilyak/awesome-ai-agents#759 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
compiler-explorer/compiler-explorer#9272 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 63/100
pop-os/cosmic-files#2117 ·
メンテナーはふだん 2 日以内に返信