zai-org / zai-org/feedback

[Bug] 微信机器人(iLink)正常执行任务后从不回复:sendmessage 从未被调用,无发送尝试也无错误日志

Open
#503 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

priority: P2 status: 待评估 type: Bug
Dominant language
No language data
Stars
22
Forks
1
PR merge metrics
No merged PRs in 30d

Description

提交前确认 · Pre-submission checklist
  • 我已搜索过现有 issue,确认这不是重复 / I searched existing issues and confirmed this isn't a duplicate.
  • 我已阅读 CONTRIBUTING.md / I've read CONTRIBUTING.md.
问题类别 · Category

对话 / Agent 交互 · Agent chat

涉及的 Agent 框架 · Agent framework

ZCode Agent(自研)

严重程度 · Severity

阻塞使用 · Blocking (无法使用核心功能 / core function unusable)

复现频率 · Reproducibility

必现 · Always

问题描述 · Description

环境:ZCode Desktop 3.10.1,Windows 11 x64;Bot provider:weixin(iLink)

从微信给机器人发消息,入站链路完全正常provider callbacktask facade sendPrompt 路由到任务会话 → 模型正常执行并产出回复,桌面端任务视图可见),但回复从未发送回微信

  • 日志中没有任何 /ilink/bot/sendmessage 调用记录
  • 也没有任何发送失败的 error/warn(失败时应记录 bot task stream event failed task=...: Weixin iLink /sendmessage failed: ...
  • summary_changes 模式下任务完成时即使摘要为空也应兜底发送"任务已完成。",实际完全静默——说明任务完成事件没有传导到发送环节

同版本下行为突变(重要线索):8 月 29 日旧微信机器人(同一 3.10.1 版本)能走到发送环节,7 次发送均失败(Weixin iLink /sendmessage failed: prepare failed,该机器人 8-30 删除重建);重建后的新机器人变为上述"完全静默",期间无应用更新(auto-update 确认 local=remote=3.10.1)。怀疑宿主内部 bots:task-stream 事件分发对该 bot 未生效,或受服务端下发配置影响(日志可见 configVersion 2026-08-27-v1-1pct 灰度配置刷新)。

已尝试且均无效:replyMode 改为 assistant_changes(微信 provider 支持该模式);重启应用;/new 新建会话后立即测试;确认轮询锁与凭据正常(入站始终工作)。

复现步骤 · Steps to reproduce
  1. ZCode 桌面端绑定微信机器人(扫码登录 iLink,enabled)
  2. 在微信里向机器人发送任意消息
  3. 观察 Zcode 日志:provider callbacktask facade sendPrompt 正常出现,任务正常完成(桌面端可见回复内容)
  4. 微信端收不到任何回复;日志无 sendmessage 调用、无错误
  5. 重启应用 / /new 新建会话 / 切换 replyMode(summary_changes ↔ assistant_changes)后复测,结果相同
期望表现 · Expected behavior

任务完成后,机器人按 replyMode 将回复(summary_changes 模式下至少兜底发送"任务已完成。")通过 /ilink/bot/sendmessage 发回微信;发送失败时在日志中记录可诊断的错误。

实际表现 · Actual behavior

微信收不到任何回复。日志中零 sendmessage 调用、零发送错误——发送动作从未被尝试(对比:8-29 旧机器人至少有 bot task stream event failed ... /sendmessage failed: prepare failed 的失败日志,而新机器人完全静默)。

ZCode 版本 · ZCode version

3.10.1

设备 / 系统 / 浏览器 · Device / OS / Browser

Windows 11 x64(10.0.26200)/ ZCode Desktop 桌面应用

截图 / 录屏 / 日志 · Screenshots / Recordings / Logs

关键日志时间线(2026-09-04,已脱敏)——入站正常、任务完成正常,但零发送:

10:11:13 provider callback provider=weixin text=... → 10:11:14 task facade sendPrompt ACK
        (回复 ~10:12:40 完成,之后无任何发送/错误日志)
11:14:20 provider callback text=试一试 → 11:14:21 sendPrompt ACK → 静默
11:15:34 应用重启(新 host 进程)
11:15:40 provider callback text=重启了 → 11:15:40 sendPrompt ACK → 静默
11:43:46 provider callback text=/new(新建会话 sess_5ed7...)
11:43:54 provider callback text=test → 11:43:55 sendPrompt ACK(新会话)
11:44:01 会话 messageCount=2,回复完成(距 sendPrompt 仅 ~5 秒)→ 仍零发送、零错误

subscribe/unsubscribe 成对出现,生命周期极短(回复完成时订阅仍存活却无发送):

10:11:16.397 subscribeConversationV4 → 10:11:46.292 unsubscribeConversationV4(29.9s)
11:19:28.356 subscribeConversationV4 → 11:19:58.125 unsubscribeConversationV4(29.8s)
11:43:58.160 subscribeConversationV4 → 11:44:34.875 unsubscribeConversationV4(36.7s)

历史对照(同版本 3.10.1,8-29 旧机器人能走到发送环节,但凭据失败):

[bots][trace:...] bot task stream event failed task=sess_6c11...: Weixin iLink /sendmessage failed: prepare failed

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the bots:task-stream event flow around subscribeConversationV4 and unsubscribeConversationV4, using the supplied logs and comparing the old and rebuilt Weixin bots. Confirm why a completed task does not reach /ilink/bot/sendmessage; done means replies are attempted according to replyMode and failures produce diagnostic logs.

Written by the indexing model from the issue text.

Assessment

Domain
api, backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.