Agent disposal does not propagate to continuable subagents — two independent lifecycle managers lack a dispose handoff contract, leaving orphaned children running indefinitely (Agent dispose 不传播到可续传子 agent——两个独立生命周期管理器缺少 dispose 交接契约,孤儿子 agent 持续运行) #4793
Replies: 2 comments 1 reply
|
Thanks for independently surfacing this. I reproduced the orphaned-child lifecycle failure against the current official One lifecycle correction to the suggested hook: Current-alpha reference:
The patch installs one exact-Agent, WeakSet-guarded cleanup in each non-continuation parent's own scope. That cleanup publishes the descendant admission cutoff before its first await, waits admitted materializations through publication or rollback, cancels the selected forest top-down, releases handles child-first, and finally re-clears any settlement notice that crossed after AgentLoop's initial disposal clear. Explicit host drains, ACP ownership, and continuation-managed parent recursion remain separate and unchanged. The final re-clear is causal, not defensive decoration: removing it makes a dispose -> persist -> same-session resume regression fail with exactly one stale Verification on the exact public commit:
This is a tested reference implementation, not an upstream merge claim. 中文摘要:已在当前官方 |
|
Independent source verification of both the report and the reference fix, against the same alpha.1 commit ( Reported bug — confirmed. Lifecycle correction — confirmed at source, and it's the right call. Two facts back Jstn-1g's move off the
Both facts independently confirm that the ownership boundary has to be the parent's own scope before registry removal, which is exactly where the reference patch installs its cleanup. Also worth noting for anyone reading this thread in the future: this is the dispose half of the same "weak cross-module lifecycle contract" pattern the maintainers are consolidating — the sibling symptom (#4666, option propagation on spawn) landed natively in alpha.1, and the browser-UUID sibling (#4756) landed via |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Summary
Disposing an agent does not dispose its continuable subagents — the
agent/disposedevent listener inSubagentContinuationManageronly cleans up tracking references (closingScopes), never callsthis.dispose(activation)on the disposed agent's children. Orphaned subagents continue running, consuming API quota, producingPARENT_UNAVAILABLEerrors, and blocking the continuation manager's drain barrier.Suggested fix: Extend the
agent/disposedlistener to callthis.dispose(activation)for the disposed agent's children — reuses existing machinery, no new code paths.Trigger Condition
ctx.subagents.startContinuable()Minimal Repro
Related
tool/call→ model API 400. Async cleanup gap; this report is a lifecycle handoff gap.reasoningEffortnot propagated to child agents. In our audit baseline (rc.2)AgentOptionshas no such field, so the child never receives it; the reporter (rc.6) describes the same gap asresolveChildAgentOptionsonly forwardingprovider/model/maxTokens("silently dropped"). Same architectural pattern either way: incomplete parent→child option propagation indsh-subagent. (Independently reproduced for spawn-backed subagents in [bug] Spawn-backed subagents drop reasoningEffort; endpoints that require thinking reject every delegation #4666.)modeloverwritten byselectionFor. Same pattern in the model selection layer: explicitAgentOptionsignored by a downstream layer.Environment
@deepseek-ai/dsh-agent-loop@0.1.1-rc.2@deepseek-ai/dsh-subagent@0.1.1-rc.2@deepseek-ai/dsh-agent@0.1.1-rc.2audit20260822Detailed evidence chain and fix analysis follow in the comments below.
About this report
EN: Reported by the OfferKuai (Offer快) Team — an AI startup building full-lifecycle job-application services, guided by the belief that "users need results, not repeated conversations." Founder: Zhaofeng (Yaming). We use DeepSeek Harness as part of our daily development workflow; this report is our way of contributing back to the ecosystem. Website: https://www.offerkuai.com/ | Contact: <contact@offerkuai.com>
概述
触发条件
最小复现
相关 Issue
(详细证据链与修复分析见下方跟帖。)
环境
@deepseek-ai/dsh-agent-loop@0.1.1-rc.2@deepseek-ai/dsh-subagent@0.1.1-rc.2@deepseek-ai/dsh-agent@0.1.1-rc.2audit20260822同样验证署名
ZH: 本报告由 OfferKuai(Offer快)团队提交 —— 一家专注 AI 全流程求职托管的创业团队,核心理念是「用户要的是结果,不是重复对话」。创始人:Zhaofeng(Yaming)。我们将 DeepSeek Harness 用于日常开发工作流,这份报告是我们对社区的回馈。官网:https://www.offerkuai.com/ | 联系:<contact@offerkuai.com>
All reactions