Skip to content

[BUG] CLI 本地命令 fork 的子代理(如 /code-review)在界面完全不可见,主对话长时间无任何反馈 #1131

Done

Description

@HelloDevin

环境

  • BaoCode 2.0.2+35(Windows)
  • CLI 内核 2.1.327
  • 项目为普通文件夹(非 git 仓库),会话 id 6221b2e1-7593-430a-9bcc-80f8090a02fa

现象

在对话里执行 /code-review(Claude Code 内置命令),界面停留在一行工具项,超过 11 分钟:

  • 没有子代理卡片
  • 没有活动条的「子智能体 …」行
  • 没有任何工具调用或进度

用户无法判断它是在工作还是卡死,只能手动打断。

证据

  1. 主会话转录 6221b2e1-….jsonl 在 11-19 11:12:27 → 11:23:44 之间 0 条事件(无 assistant、无 tool_use、无流式条目)。

  2. 同一时段 …/6221b2e1-…/subagents/ 下持续写入 7 个子代理转录:

    • 1 个编排者(general-purpose,requestShape: foreground,无 toolUseId)
    • 6 个审查员(Angle A–E + CLAUDE.md 规范检查),11:15–11:21 陆续 spawn

    即:子代理一直在正常工作,只是界面上没有任何入口。

疑似原因

  • 转录中可见该命令带 local-command-caveat:"was run directly in Claude Code, not sent to you" —— CLI 本地执行,直接 fork 技能子代理,主对话流里 不存在 Agent/Task/Workflow 工具调用。
  • BaoCode 只在主流中出现上述工具调用时才创建子代理卡片(lib/kernel/claude_code/claude_code_translator.dart:1076 起);Skill 工具仅渲染为普通工具行(同文件 :1275)。
  • 也未监听 CLI 的 subagents/ 目录。

与 #836 的关系

同类问题(子代理无入口),但触发路径不同:#836/#949 覆盖的是 Workflow 工具启动的子代理;本问题是 CLI 本地命令直接 fork 的技能子代理,目前仍无卡、无活动条、无任何提示。

建议

  1. 检测到 Skill 工具调用 / 主流长时间无事件、而 subagents/ 目录有新写入时,至少显示一条「子代理运行中」的活动行。
  2. 中期:像处理 Workflow 子代理那样,为技能 fork 的子代理生成卡片(可通过监听 subagents/*.meta.json 按会话关联)。

Activity

  1. leookun commented on Nov 19, 2026

    @leookun
    Collaborator

    在某些 windows 上,claude code 在读取 skill 时候会无限卡住,尝试一下内置内核,欢迎再次回复

  2. 630642270 commented on Nov 19, 2026

    @630642270

    1c6673cae16596da0d6fcdd76e4b15d4 是会有这个问题只在部分机器上这样,原因是 review 开的是最大的 会直接并发十几个agent ,查完再复查搞得就会很久,只能显示的 /code-review low 这样去指定review强度,最好的一个办法就是禁用使用这个skill ,另外安装一个,在有卡住的这个问题上我暂时是这么解决的

  3. added
    accepted
    on Nov 19, 2026
  4. HelloDevin commented on Nov 19, 2026

    @HelloDevin
    Author

    感谢修复!PR #1141 覆盖的正是我们这边观察到的场景,补充两条复现数据供参考:

    • CLI 2.1.327(BaoCode 2.0.2+35,Windows):/code-review(未指定档位,继承 session effort=max)时,主会话转录 11:12:27 → 11:23:44 零事件,而 subagents/ 下编排者 + 6 个审查子代理持续写入——和 PR 里记录的 "until the run ends, nothing arrives" 完全一致。
    • 降档后同样无卡片:/code-review medium、/code-review low 均复现(主流程仅在命令结束时有 local_command 记录),说明与强度无关。

    合并后会再验证并反馈。再次感谢!

  5. added a commit that references this issue on Nov 19, 2026
  6. leookun commented on Nov 24, 2026

    @leookun
    Collaborator

    Follow-up to #1141 merged in #1290: when you type /code-review (or another forked skill), the subagent card now fills in live. BaoCode reads the run's own transcript from the session's subagents/ folder as the CLI writes it, instead of waiting for the end. Local sessions only for now. Ships with the next release — thanks for the detailed evidence, it pointed straight at the fix.

  7. added a commit that references this issue on Nov 24, 2026
    66f2f60
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    accepted

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions