-
-
Notifications
You must be signed in to change notification settings - Fork 80.7k
[Feature Request] Telegram Channel: Support Thread Binding for Subagent Sessions #42986
Copy link
Copy link
Open
Labels
P2Normal backlog priority with limited blast radius.Normal backlog priority with limited blast radius.clawsweeper:needs-live-reproClawSweeper needs live local, crabbox, or manual validation to confirm this issue.ClawSweeper needs live local, crabbox, or manual validation to confirm this issue.clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.ClawSweeper marked this issue as needing maintainer review before automation.clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.ClawSweeper marked this issue as needing a product or behavior decision.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.impact:message-lossChannel message delivery can be lost, duplicated, or misrouted.Channel message delivery can be lost, duplicated, or misrouted.impact:session-stateSession, memory, transcript, context, or agent state can drift or corrupt.Session, memory, transcript, context, or agent state can drift or corrupt.issue-rating: 🐚 platinum hermitGood issue quality with a plausible reproduction path needing some confirmation.Good issue quality with a plausible reproduction path needing some confirmation.staleMarked as stale due to inactivityMarked as stale due to inactivity
Description
Metadata
Metadata
Assignees
Labels
P2Normal backlog priority with limited blast radius.Normal backlog priority with limited blast radius.clawsweeper:needs-live-reproClawSweeper needs live local, crabbox, or manual validation to confirm this issue.ClawSweeper needs live local, crabbox, or manual validation to confirm this issue.clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.ClawSweeper marked this issue as needing maintainer review before automation.clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.ClawSweeper marked this issue as needing a product or behavior decision.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.impact:message-lossChannel message delivery can be lost, duplicated, or misrouted.Channel message delivery can be lost, duplicated, or misrouted.impact:session-stateSession, memory, transcript, context, or agent state can drift or corrupt.Session, memory, transcript, context, or agent state can drift or corrupt.issue-rating: 🐚 platinum hermitGood issue quality with a plausible reproduction path needing some confirmation.Good issue quality with a plausible reproduction path needing some confirmation.staleMarked as stale due to inactivityMarked as stale due to inactivity
Type
Fields
Priority
None yet
OpenClaw 功能请求:Telegram 渠道支持 Thread Binding
文档信息
1. 问题描述
1.1 当前行为
当用户使用
sessions_spawn创建子代理时,如果同时设置mode="session"和thread=true参数,系统会抛出以下错误:1.2 预期行为
用户应能够在 Telegram 渠道中使用
mode="session"和thread=true参数组合,以创建持久化的子代理会话,并将子代理绑定到特定的 Telegram conversation/thread。1.3 影响范围
2. 原因分析
2.1 技术根因
subagent_spawningHook2.2 源码位置
extensions/telegram/index.tsextensions/discord/src/subagent-hooks.tsregisterDiscordSubagentHooksautoBindSpawnedDiscordSubagent2.3 缺失组件
Telegram 渠道缺少以下关键组件:
subagent_spawning事件监听器注册subagent_ended事件监听器注册3. 功能请求
3.1 核心需求
在 Telegram 渠道插件中注册
subagent_spawninghook,实现 thread binding 功能,使用户能够:mode="session"创建持久化子代理会话3.2 建议实现方案
3.2.1 代码结构
在
extensions/telegram/index.ts中添加以下内容:3.2.2 事件监听
subagent_spawningsubagent_ended3.2.3 配置项设计
添加新的配置项
channels.telegram.threadBindings:3.3 参考实现
完整参考 Discord 渠道的实现:
extensions/discord/src/subagent-hooks.tsregisterDiscordSubagentHooks()autoBindSpawnedDiscordSubagent()建议采用相似的设计模式,确保跨渠道一致性。
4. 用户价值
4.1 功能收益
4.2 使用场景
5. 技术评估
5.1 难度评估
5.2 测试建议
6. 附录
6.1 错误信息全文
6.2 相关文件路径
6.3 配置示例(完整版)