多 agent 协作中子 agent 中断后主 agent 仍长时间等待
- Dominant language
- TypeScript
- Stars
- 2.7k
- Forks
- 395
- Avg merge
- 21h 48m
- Merged PRs (30d)
- 776
Description
**提交人**: 云诺羲Rinorsi
**客户端版本**: 0.1.28
---
## 使用场景
在多 agent 协作任务执行过程中,模型可能意外中断,或用户切换主模型,导致正在运行的子 agent 被自动中断。此时接手的主 agent 仍会依赖并等待已经中断的子 agent 返回结果。
该问题可以稳定复现:当 5.6 子 agent 在执行期间被中断后,Opus 主 agent 仍持续等待 5.6 的回执;本次等待约半小时后,主 agent 才主动检查并发现子 agent 已经挂起/中断。
## 诉求
希望多 agent 协作系统能够及时识别子 agent 已中断、挂起或不可达的状态,避免主 agent 对永远不会返回的结果进行长时间等待。
## 建议方案
- 为子 agent 增加健康状态和心跳检测,区分运行中、已完成、失败、已中断和不可达等状态。
- 子 agent 被中断或长时间无响应时,及时将任务标记为失败/不可用,并把状态变化通知主 agent 和用户。
- 主 agent 收到失败状态后,应停止等待该子 agent,继续执行可行的降级流程,或明确提示需要重试。
- 可考虑提供可配置的响应超时、检测间隔和重试策略。
这样可以避免模型切换或意外中断后出现长时间无反馈,也能让协作任务更快暴露真实状态。
---
**版本区域**: CN
**OS**: darwin arm64 (25.6.0)
**界面语言**: zh-CN
Contributor guide
Research direction
No files, tests, or entry points are named. Start by tracing the multi-agent task lifecycle, especially interruption detection and the main agent's wait path. Done means an interrupted, suspended, or unreachable child agent is detected, its failure is communicated, and the main agent stops waiting and follows a retry or fallback path.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- ai
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100