bytedance/deer-flow

[Stability][BUG-002] Subagent task completes internally but parent task result fails

已关闭

#3,113 创建于 2026年5月21日

 (0 条评论) (0 个反应) (0 位负责人)Python (9,005 个派生)batch import
help wanted

仓库指标

星标
 (67,767 个星标)
PR 合并指标
 (平均合并 2天 5小时) (30 天内合并 229 个 PR)

描述

Parent stability dashboard: #3107

This issue tracks BUG-002 from #3107.

Problem

In Ultra mode, subagents are launched and complete internally, but the parent task tool reports failure instead of returning the subagent result to the lead agent.

Evidence

Source: gateway log, subagent executor + task tool + tool error middleware.

Subagent general-purpose completed async execution
Subagent general-purpose final messages count: ...
Task ... status: completed
Tool execution failed (async): name=task
TypeError: 'AsyncCallbackManager' object is not iterable

Stack root:

deerflow/tools/builtins/task_tool.py
  _report_subagent_usage(runtime, result)
  _find_usage_recorder(runtime)
  for cb in callbacks:
TypeError: 'AsyncCallbackManager' object is not iterable

Source: checkpoint/state inspection of parent tool result.

Error: Tool 'task' failed with TypeError: 'AsyncCallbackManager' object is not iterable. Continue with available context, or choose an alternative tool.

Across multiple Ultra runs:

  • subagents were started;
  • subagents logged internal completion;
  • parent-visible task tool results contained only wrapper errors;
  • lead agent fell back to direct work;
  • run accounting showed subagent_tokens=0.

Impact

  • Ultra mode loses the value of subagent work.
  • The lead agent repeats overlapping fetch/research work.
  • User-perceived latency and token usage increase.
  • Frontend task state can become misleading because the task completed internally but failed at the parent wrapper layer.

Expected behavior

  • Completed subagent results should be delivered back to the lead agent.
  • Usage-reporting failures should not turn a successful subagent result into a failed task tool result.
  • Subagent token accounting should be reflected correctly.

贡献者指南