deerflow2/backend/app/channels
Willem Jiang 8e48b7e85c
fix(channels): preserve clarification conversation history across follow-up turns (#2444)
* fix(channels): preserve clarification conversation history across follow-up turns

Pin channel-triggered runs to the root checkpoint namespace and ensure thread_id is always present in configurable run config so follow-up replies resume the same conversation state.

Add regression coverage to channel tests:

assert checkpoint_ns/thread_id are passed in wait and stream paths
add an integration-style clarification flow test that verifies the second user reply continues prior context instead of starting a new session
This addresses history loss after ask_clarification interruptions (issue #2425).

* Apply suggestions from code review

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* fix(channels): copy configurable dict before injecting run-scoped fields

  When configurable was already a plain dict, _resolve_run_params mutated
  it in place, leaking checkpoint_ns and thread_id back into the shared
  session config. Always copy via dict() before mutating to prevent
  cross-user or cross-channel config pollution.

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-05-04 16:14:07 +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 fix: avoid treating Feishu file paths as commands (#1654) 2026-04-01 23:23:00 +08:00
dingtalk.py feat(channels): add DingTalk channel integration (#2628) 2026-04-30 11:25:33 +08:00
discord.py feat(channels): add Discord channel integration (#1806) 2026-04-11 17:48:04 +08:00
feishu.py feat(channels): add DingTalk channel integration (#2628) 2026-04-30 11:25:33 +08:00
manager.py fix(channels): preserve clarification conversation history across follow-up turns (#2444) 2026-05-04 16:14:07 +08:00
message_bus.py refactor: split backend into harness (deerflow.*) and app (app.*) (#1131) 2026-03-14 22:55:52 +08:00
service.py feat(channels): add DingTalk channel integration (#2628) 2026-04-30 11:25:33 +08:00
slack.py fix(channels): accept single slack allowed user (#2481) 2026-04-25 19:40:52 +08:00
store.py refactor: split backend into harness (deerflow.*) and app (app.*) (#1131) 2026-03-14 22:55:52 +08:00
telegram.py Improve Python reliability in channel retries and thread typing (#1776) 2026-04-03 07:50:11 +08:00
wechat.py feat: add WeChat channel integration (#1869) 2026-04-10 20:49:28 +08:00
wecom.py feat(channels): add DingTalk channel integration (#2628) 2026-04-30 11:25:33 +08:00