zai-org / zai-org/feedback

[Bug] 子智能体派发 100% 失败:被路由到未配置的 builtin:bigmodel-start-plan;GUI 新注册的子智能体对已存在会话不可见

Open
#616 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

环境
  • macOS 26.6.2 (arm64),ZCode 桌面版 3.11.2
  • 主会话模型:builtin:bigmodel-coding-plan/GLM-5.3-Flash(工作正常)
  • 反馈日期:2026-09-12
问题 1:Agent tool 派发子智能体一律失败(主要问题)
现象

任意类型(Exploregeneral-purpose 均复现)的子智能体派发立即失败,共复现 6 次,错误完全一致:

{
  "name": "AiSdkModelAdapterError",
  "message": "Model provider is not configured: builtin:bigmodel-start-plan",
  "code": "provider_not_found",
  "context": {
    "providerId": "builtin:bigmodel-start-plan",
    "modelId": "GLM-5.3-Flash",
    "reason": "provider_not_configured",
    "retryable": false,
    "source": "runtime"
  }
}

失败发生在子智能体首个 turn 的 processing_input 阶段(模型适配器解析供应商时),子智能体一步都没执行。

关键观察

子智能体请求的 modelId 与主会话模型完全相同(GLM-5.3-Flash),但供应商前缀被运行时从 bigmodel-coding-plan 强制改写为 bigmodel-start-plan,而后者未随账号开通。推测运行时把子智能体固定路由到 start-plan 通道。另查本地日志,builtin:bigmodel-start-plan 至少自 2026-09-06 起就处于 unavailable 状态(历史会话恢复时多次出现 "Resumed session persisted model is unavailable" 警告)。

复现步骤
  1. 在任意会话中让主模型通过 Agent tool 派发任意子智能体(如 Explore 类型执行只读勘察任务)
  2. 派发立即返回上述 provider_not_found 错误
已尝试的排查(均无效)
  • 更新/开通对应套餐后重启应用再试(06:58 重启后 06:58:54 派发仍失败)
  • 多次重启应用(06:50、06:58 两次重启后均复现)
  • 等待 90 秒以上让配置传播后再试
  • 排查本地配置点:~/.zcode/cli/config.json(仅插件开关)、db.sqlitelocal_setting(模型相关仅 reasoningLevel)、环境变量、CLI 参数——不存在任何可供用户指定子智能体模型/供应商的配置
期望

子智能体跟随会话模型所用的供应商(或账号已开通的供应商)派生;或提供配置项/每智能体模型选择,让用户指定子智能体走哪条通道。当前主会话完全正常、子智能体 100% 失败,属于功能性阻断。

问题 2:GUI 新注册的子智能体对已存在会话不可见
复现步骤
  1. 会话运行中,通过「设置 → 子智能体」新建子智能体 courier(已安装、已启用、绑定 GLM-5.3-Flash、全部工具)
  2. 回到该会话,用 Agent tool 派发 subagent_type: courier
实际表现

Agent type 'courier' not found,可用列表始终只有 general-purpose, Explore, document-skills:judge, judge(派发时间晚于注册时间)。另外手工创建 ~/.zcode/agents/courier.md 也未被加载,配置文档中未说明该路径是否受支持。

推测与期望

可用智能体列表疑似为会话启动时的快照,注册变更不刷新到已存在(含跨重启 resume)的会话。期望:注册变更对后续派发生效,或在 GUI 明示「仅新会话生效」。

日志
  • 日志文件:~/.zcode/cli/log/zcode-2026-09-12.jsonl
  • 检索方式:搜 provider_not_found,或搜 toolName":"Agenttool.call.failed / turn.failed 事件
  • 关键会话:sess_77bd70d0-2225-45cd-8eda-bfb4b02fb0e3;失败时间点:06:48、06:51:15、06:56:4x、06:58:54、07:0x(provider 问题)、07:09:12、07:13:33(courier not found)

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 inspecting the Agent tool failure events in ~/.zcode/cli/log/zcode-2026-09-12.jsonl, especially provider_not_found and tool.call.failed entries for the cited session. Compare the persisted model/provider data with the available subagent list after registering courier in Settings. Done means subagents use an available provider and newly registered agents are visible to subsequent dispatches, or the session-refresh behavior is explicitly defined.

Written by the indexing model from the issue text.

Assessment

Domain
ai, desktop
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.