bytedance/deer-flow

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

Fermée

#3 113 ouverte le 21 mai 2026

 (0 commentaire) (0 réaction) (0 personne assignée)Python (9 005 forks)batch import
help wanted

Métriques du dépôt

Stars
 (67 767 étoiles)
Métriques de merge PR
 (Merge moyen 2j 5h) (229 PRs mergées en 30 j)

Description

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.

Guide contributeur