Skip to content

openclaw4.5,旨意只能在太子执行,无法正确的流转 #274

@chick-liu

Description

@chick-liu

环境

  • OpenClaw 版本:2026.4.5 (3e72c03)
  • 操作系统:Darwin 24.6.0 (x64) / macOS
  • Python 版本:3.9.6

问题描述

无法正确的使用旨意传递链条
在测试“三省六部旨意传递链条”时,需要通过 sessions_send 以 sessionKey 精确投递到指定代理(如 agent:zhongshu:main)。
但在调用 sessions_send(sessionKey=...) 时,系统报错:
Provide either sessionKey or label (not both)。
这意味着即便只传 sessionKey,工具层仍被判定“同时传了 label”。

为绕过该校验,我显式传 label="unused",使校验逻辑放行。
该方式可投递,说明当前版本对 label 的处理存在冲突:只要 label 不为 "unused" 即视为“同时传 label”

同时,在派发 subagent 时,出现:
streamTo is only supported for runtime=acp; got runtime=subagent
显示 subagent 流程被注入了 ACP 专属参数,导致 subagent 派发失败。

复现步骤

  1. 调用 sessions_send(sessionKey="agent:zhongshu:main", message="...")
    → 报错 Provide either sessionKey or label (not both)
  2. 改为 sessions_send(sessionKey="agent:zhongshu:main", label="unused", ...)
    → 可投递,说明 label 校验与 sessionKey 存在冲突
  3. 尝试 sessions_spawn(runtime="subagent")
    → 报错 streamTo is only supported for runtime=acp

期望行为

  • sessions_send 仅传 sessionKey 时不应被判定携带 label。
  • subagent 不应被注入 ACP 专属参数(如 streamTo)。

实际行为

  • sessions_send 报错“sessionKey/label 互斥”。
  • subagent 被注入 ACP 参数导致失败。

错误日志

Provide either sessionKey or label (not both)
streamTo is only supported for runtime=acp; got runtime=subagent

证据/文件路径:

  • /Users/user/.npm-global/lib/node_modules/openclaw/dist/pi-embedded-DWASRjxE.js(label/sessionKey 校验逻辑)

阻塞项:

  • label 与 sessionKey 互斥校验导致无法稳定投递
  • subagent 参数注入导致派发失败

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingupstream

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions