zai-org / zai-org/feedback

ZCode 3.9.2 Windows:始终允许本项目不持久化(permission 表恒空)+ Bot Channel 重启重连与会话绑定诉求

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

Nobody has claimed this yet.

priority: P2
Dominant language
No language data
Stars
22
Forks
1
PR merge metrics
No merged PRs in 30d

Description

环境

  • ZCode 桌面端 3.9.1 → 3.9.2(Windows x64,CLI 0.16.5)
  • 复现仓库:任意项目

问题一:MCP/工具授权持久化缺失(核心缺陷)

现象:权限弹窗选择「始终允许本项目」后,授权不落库。每次重启/新会话后同一工具再次弹窗。

证据链(3.9.2 实测):

  1. ~/.zcode/cli/db/db.sqlitepermission 表在多次「始终允许」后仍为 0 行(含 WAL 视角复核);
  2. 日志中 MCP 工具(如 mcp__node_repl__js)首次调用 reason="Approved once"(单次语义),第二次调用即 deny
  3. Bash 工具的 always-allow 同样不入表——影响面为全部工具类型,非 MCP 独有;
  4. 3.9.2 changelog 无相关修复项,升级后问题依旧。

期望:「始终允许本项目」写入 permission 表并在后续会话命中免弹。

问题二:Bot Channel 重启后无法自动恢复连接

社区已有反馈(#200):电脑重启后重新打开 ZCode,微信/飞书助手无法自动恢复连接,需删除机器人重新扫码绑定。我们在飞书通道实测同样命中。

问题三(功能请求):Bot Channel 支持绑定现有会话

场景:希望飞书/微信 Bot 作为「当前正在运行的主会话的远程入口」——在手机上继续同一个会话的上下文,而不是每次消息都开新任务会话。

现状(3.9.2 源码级确认):findAuthorizedBot/findBoundUser 仅按 provider+providerUserId 做授权绑定,无 session 概念;消息一律路由到新建任务会话。/bind 只解决授权字段(providerUserId 落库),不改变会话路由。

期望:提供「绑定/切换到指定现有会话」的能力(命令或 /bind 扩展),使 Bot 消息续接该会话上下文。这对长任务远程跟进(跨端同一上下文)是关键能力。

关联

  • #200(重启重连)
  • #49(重启后上下文丢失)

感谢!

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

No implementation files or tests are identified. Start by tracing findAuthorizedBot and findBoundUser, then inspect permission persistence and session routing; done means permissions survive restart, bot connections recover, and a bot can bind to an existing session.

Written by the indexing model from the issue text.

Assessment

Tech stack
sqlite
Domain
authentication, cli, database, operating-systems
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.