bytedance/deer-flow

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

Chiusa

#3113 aperta il 21 mag 2026

 (0 commenti) (0 reazioni) (0 assegnatari)Python (9005 fork)batch import
help wanted

Metriche repository

Star
 (67.767 stelle)
Metriche merge PR
 (Merge medio 2g 5h) (229 PR mergiate in 30 g)

Descrizione

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.

Guida contributor