diff --git a/backend/packages/harness/deerflow/tools/builtins/task_tool.py b/backend/packages/harness/deerflow/tools/builtins/task_tool.py index 9f3f13b..55a41e3 100644 --- a/backend/packages/harness/deerflow/tools/builtins/task_tool.py +++ b/backend/packages/harness/deerflow/tools/builtins/task_tool.py @@ -86,6 +86,8 @@ async def task_tool( sandbox_state = runtime.state.get("sandbox") thread_data = runtime.state.get("thread_data") thread_id = runtime.context.get("thread_id") if runtime.context else None + if thread_id is None: + thread_id = runtime.config.get("configurable", {}).get("thread_id") # Try to get parent model from configurable metadata = runtime.config.get("metadata", {})