Skip to content

[Feature]: Support thread-based replies in Feishu plugin #29791

@songyaolun

Description

@songyaolun

Summary

Enable the Feishu plugin to reply within specific message threads instead of the main chat, supporting both direct messages and group chats.

Problem to solve

Currently, the Feishu plugin cannot reply within specific threads. Whether in direct messages or group chats, the bot always replies in the main chat instead of the specific thread where the user's message originated. This behavior breaks conversation context and severely limits the bot's ability to handle parallel conversations. I would like to develop a new feature to implement thread-based routing to solve this pain point and submit a Pull Request.

Proposed solution

Use thread_id (fallback to root_id) as the topic key for Feishu topic-scoped session routing (groupSessionScope / legacy
topicSessionMode).
Keep non-topic group and DM behavior unchanged, so mainline conversations retain existing continuous memory.
For messages already in a topic/thread context, always reply with reply_in_thread=true using the current inbound
message_id target.
Expected UX: different topics in the same group map to independent sessions, and bot replies stay in the original topic
instead of creating a new one.

Alternatives considered

No response

Impact

Affected: Feishu group-chat users who use topics/threads heavily (especially multi-topic support, ops, and project
groups).
Severity: High (session context mixing and wrong reply placement can break expected workflow and reduce trust in bot
responses).
Frequency: Frequent/always in topic-heavy groups (every time multiple topics are active or bot replies from topic
messages).
Consequence: Topic contexts collide, bot may reply into a new/wrong topic, users must re-mention/restate context manually,
causing repeated work and slower collaboration.

Evidence/examples

No response

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions