zai-org / zai-org/feedback

[Bug] Skill 工具间歇性返回 "Skill not found":技能列表注入正常,执行器注册表查找失败

Open
#494 2 comments 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

问题描述 · Description

Skill 工具间歇性返回 Skill not found: <name>(工具结果 isError: true),但同一次模型请求里,完整技能列表(含该 skill 的名字与 SKILL.md 路径)由 system reminder 正常注入。也就是说"技能列表注入"和"Skill 工具执行器注册表"两套数据脱节:注入器有该 skill,执行器查不到。

失败特征:本地瞬时查找失败(tool.call.failed,module core.tool.executor,durationMs 28–32ms),不是超时也不是读文件失败;同一会话内 Bash / Read / TodoWrite 等其他工具完全正常;同会话重试无效新开会话自愈。受影响的全是 workspace .agents/skills/ 下的技能(release-pipeline、development-workflow、python-coding),已跨 4 天、多个会话复现。

复现步骤 · Steps to reproduce

偶现,暂无稳定主动复现路径。观测到的出现方式:

  1. 打开 ZCode 桌面版,在固定 workspace 正常对话(技能列表可见、模型可正确引用技能名)
  2. 下一轮用户消息触发编码任务,模型在任务首轮即发起 Skill 调用(如 skill="python-coding",纯名字,与列表一致)
  3. 工具立即返回 Skill not found: python-coding;同轮第二个 Skill 调用(release-pipeline)同样失败
  4. 同会话重试仍失败;新开会话后同名调用成功

期望表现 · Expected behavior

技能列表中列出的 skill,用列表中的名字调用 Skill 工具应正常加载执行。

实际表现 · Actual behavior

Skill not found: <name>。客户端日志示例:

{"timestamp":"2026-09-03T08:46:33.232Z","level":"error","event":"tool.call.failed","module":"core.tool.executor","message":"Tool call failed","sessionId":"sess_23ad21ba-...","turnId":"turn_...","toolCallId":"call_8efe61bf569f4983bd808466","durationMs":28,"status":"failed","context":{"turnNumber":2,"iteration":1,"querySource":"main_turn","toolName":"Skill"}}

模型收到的工具结果:{"role":"tool","content":"Skill not found: python-coding","toolCallId":"call_8efe61bf569f4983bd808466","toolName":"Skill","isError":true}

ZCode 版本 · ZCode version

3.10.2(production,Electron 桌面版)

设备 / 系统 · Device / OS

Windows 11 Pro(10.0.26200)x64;模型 builtin:bigmodel-coding-plan / GLM-5.3-Flash

截图 / 日志 · Evidence

复现历史(本机 ~/.zcode/cli/log/zcode-*.jsonl,全部为 tool.call.failed,tool=Skill):

时间 (UTC) 失败 skill 会话内位置
2026-08-28 04:18:40 release-pipeline turn 5
2026-08-29 10:12:13 development-workflow turn 2 iteration 0
2026-08-29 10:12:47 development-workflow turn 2 iteration 1(重试仍失败)
2026-08-29 13:39:32 development-workflow turn 8
2026-08-30 06:59:35 release-pipeline turn 1
2026-09-03 08:46:33 python-coding turn 2 iteration 1
2026-09-03 08:46:51 release-pipeline turn 2 iteration 1

2026-09-03 案例的完整排查结论(供定位参考):

  1. SKILL.md 文件与 frontmatter 完好,故障期间无改动;skills.enabled 等配置正常。
  2. 失败发生时的那次模型请求 payload 中,system reminder 完整包含 python-coding 条目(名字、描述、SKILL.md 路径均正确)→ 注入器与执行器的数据源不同步。
  3. 排除名字写错:同一 workspace 的新会话中,Skill(skill="python-coding") 纯名字调用成功加载。
  4. 触发会话是新建会话(首条请求 querySource: session_title),不是恢复的旧会话。
  5. 会话与调用标识(便于查遥测):session sess_23ad21ba-4862-4afe-be4c-868b13302f1b,traceId 9f33b354-2008-4354-b235-2b0f99eab798,toolCallId call_8efe61bf569f4983bd808466 / call_b29335b53a3f4ae7abc4bfe6

猜测方向(仅供参考):Skill 工具执行器侧的技能注册表与列表提醒注入器各自构建/持有数据,个别会话中执行器侧注册表未同步或被清空后未重建。

与 #76 不同:#76 是斜杠菜单 UI 不显示技能(已在 v3.2.4 修复);本 bug 中技能列表/菜单可见,是 Skill 工具执行环节失败,属另一层面。

影响

故障会话中模型拿不到 skill 纪律正文,编码 / TDD / 发版等 discipline 静默降级,用户不易察觉。我们目前已用 workspace 规则兜底(失败后直接 Read SKILL.md),但希望根因修复。

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 with the core.tool.executor failures in the provided JSONL logs, using session sess_23ad21ba-4862-4afe-be4c-868b13302f1b and the listed trace and tool-call IDs. Compare the executor's skill registry with the system-reminder skill list during new-session creation; done means workspace skills listed in the reminder execute successfully without requiring a new session.

Written by the indexing model from the issue text.

Assessment

Tech stack
electron
Domain
desktop, tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.