deerflow2/backend/app/channels
DanielWalnut 05be7ea688
fix(subagents): raise general-purpose max_turns to 150 and default timeout to 30min (#3610)
* fix(subagents): raise general-purpose max_turns to 150 and default timeout to 30min

Deep-research subtasks failed out of the box with GraphRecursionError (Recursion limit of 100 reached): the built-in general-purpose subagent caps at max_turns=100. Raise it to 150 and bump the default subagent timeout from 900s (15min) to 1800s (30min) so the extra turns have time to run instead of shifting the failure to a timeout. The lead agent recursion_limit (100) is unchanged; the failures are subagent-only.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* docs(subagents): clarify lead recursion_limit is independent of subagent max_turns

Add comments at both lead recursion_limit=100 sites (gateway services + channel manager) explaining the lead's LangGraph super-step budget is separate from subagent depth, so the two 100s are not conflated. Comment-only, no behavior change.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* docs(subagents): clarify built-in vs custom timeout scope; pin bash max_turns in test

Review follow-ups: (1) clarify SubagentConfig docstring + global timeout field/comment that the 1800 default applies to built-in subagents (custom agents keep their own timeout_seconds); (2) pin bash.max_turns==60 in the defaults regression test so the config.example.yaml doc cannot drift; (3) rename test_default_timeout_preserved_when_no_config -> test_explicit_global_timeout_propagates_to_general_purpose since it intentionally exercises an explicit non-default 900. No runtime behavior change.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-16 19:55:04 +08:00
..
__init__.py Refactor DeerFlow to use Gateway's LangGraph-compatible API 2026-04-26 20:38:34 +08:00
base.py feat(channels): add DingTalk channel integration (#2628) 2026-04-30 11:25:33 +08:00
commands.py feat(im): Add user-owned IM channel connections (#3487) 2026-06-12 15:24:58 +08:00
connection_identity.py feat(im): Add user-owned IM channel connections (#3487) 2026-06-12 15:24:58 +08:00
dingtalk.py feat(im): Add user-owned IM channel connections (#3487) 2026-06-12 15:24:58 +08:00
discord.py fix(channels): close Discord file handle after upload (#3561) 2026-06-13 23:27:17 +08:00
feishu.py feat(im): Add user-owned IM channel connections (#3487) 2026-06-12 15:24:58 +08:00
manager.py fix(subagents): raise general-purpose max_turns to 150 and default timeout to 30min (#3610) 2026-06-16 19:55:04 +08:00
message_bus.py feat(im): Add user-owned IM channel connections (#3487) 2026-06-12 15:24:58 +08:00
runtime_config_store.py feat(im): Add user-owned IM channel connections (#3487) 2026-06-12 15:24:58 +08:00
service.py feat(im): Add user-owned IM channel connections (#3487) 2026-06-12 15:24:58 +08:00
slack.py feat(im): Add user-owned IM channel connections (#3487) 2026-06-12 15:24:58 +08:00
store.py refactor: split backend into harness (deerflow.*) and app (app.*) (#1131) 2026-03-14 22:55:52 +08:00
telegram.py feat(telegram): stream agent replies by editing the placeholder message in place (#3534) 2026-06-13 08:38:28 +08:00
wechat.py feat(im): Add user-owned IM channel connections (#3487) 2026-06-12 15:24:58 +08:00
wecom.py fix(channels): surface WeCom WebSocket connection failures (#2000) (#3526) 2026-06-13 22:34:00 +08:00