bytedance/deer-flow
View on GitHub[Stability][BUG-002] Subagent task completes internally but parent task result fails
Closed
#3113 opened on May 21, 2026
help wanted
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
tasktool 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
tasktool result. - Subagent token accounting should be reflected correctly.