问题 / Problem
同时启用 OpenPI 和 pi-intercom 后,OpenPI 原生 Subagent 与 Workflow child 会在首次模型请求前失败:
Child tool preflight failed: requested tool "intercom" is unavailable after child extensions initialized.
这会使所有继承父会话工具面的 child 无法启动。更换 explorer、reviewer 等内置 agent type,或不指定 agent type,结果相同。
Related to #455.
复现 / Reproduction
- 在 Pi 中安装并启用当前版本的
@tt-a1i/openpi 与 pi-intercom。
- 重启或 reload,使父会话同时具有 OpenPI 的 Subagent/Workflow 工具和
intercom 工具。
- 调用一个普通的
subagent_spawn,或运行包含 agent() 的 Workflow。
- Child 在模型调用前被 preflight 拒绝。
复现版本:
- Pi
0.85.1
@tt-a1i/openpi 0.8.1
pi-intercom 0.13.0
- Node.js
26.0.0
预期行为 / Expected behavior
- OpenPI child 可以正常启动。
intercom 不进入并发的 in-process child。
- 父会话中的
intercom 保持可用。
实际行为 / Actual behavior
OpenPI 把父会话当前启用的 intercom 加入 child 请求工具列表,但 child resource loading 又按设计移除了 pi-intercom。扩展绑定后的工具检查因此把 intercom 判为缺失并终止启动。未发生模型请求。
初步定位 / Analysis
当前 extensions/shared/child-session.ts 中:
blockedPackageSources() 与 createEphemeralChildSettings() 会从 child settings 移除 pi-intercom。源码注释说明,这是为了避免多个并发 in-process child 通过共享 process.env 串接 session identity。这一安全边界是合理的。
inheritedChildToolAllowlist(pi.getActiveTools(), roleTools) 继承父会话的 active tools。
effectiveChildToolAllowlist() 只过滤 CHILD_EXCLUDED_TOOL_NAMES;intercom 不在其中,因此仍留在 requested tools。
bindChildSessionExtensions() 随后发现 child registry 没有 intercom,触发上述 preflight error。
Direct Subagent 与 Workflow 共用这组 helper,因此两条路径都会受影响。
建议的最小修复 / Suggested minimal fix
在从父会话投影 child tools 时,把 intercom 作为 child-ineligible tool 过滤掉,同时继续从 child resources 中排除 pi-intercom,并保持父会话工具不变。资源排除与 requested-tool preflight 最好共享同一 child-ineligible policy,避免“扩展按设计移除,但工具仍被声明为必需”的不一致。
建议增加两个回归测试:
- 父会话启用
intercom 时,Direct Subagent 能启动,child 中无 intercom,父会话仍保留该工具。
- 相同条件下,Workflow
agent() 能启动并保持相同边界。
隐私说明 / Privacy
此报告未包含凭据、用户目录、项目路径、项目名称、session ID、会话内容、Provider/模型身份或私有日志。
问题 / Problem
同时启用 OpenPI 和
pi-intercom后,OpenPI 原生 Subagent 与 Workflow child 会在首次模型请求前失败:这会使所有继承父会话工具面的 child 无法启动。更换
explorer、reviewer等内置 agent type,或不指定 agent type,结果相同。Related to #455.
复现 / Reproduction
@tt-a1i/openpi与pi-intercom。intercom工具。subagent_spawn,或运行包含agent()的 Workflow。复现版本:
0.85.1@tt-a1i/openpi0.8.1pi-intercom0.13.026.0.0预期行为 / Expected behavior
intercom不进入并发的 in-process child。intercom保持可用。实际行为 / Actual behavior
OpenPI 把父会话当前启用的
intercom加入 child 请求工具列表,但 child resource loading 又按设计移除了pi-intercom。扩展绑定后的工具检查因此把intercom判为缺失并终止启动。未发生模型请求。初步定位 / Analysis
当前
extensions/shared/child-session.ts中:blockedPackageSources()与createEphemeralChildSettings()会从 child settings 移除pi-intercom。源码注释说明,这是为了避免多个并发 in-process child 通过共享process.env串接 session identity。这一安全边界是合理的。inheritedChildToolAllowlist(pi.getActiveTools(), roleTools)继承父会话的 active tools。effectiveChildToolAllowlist()只过滤CHILD_EXCLUDED_TOOL_NAMES;intercom不在其中,因此仍留在 requested tools。bindChildSessionExtensions()随后发现 child registry 没有intercom,触发上述 preflight error。Direct Subagent 与 Workflow 共用这组 helper,因此两条路径都会受影响。
建议的最小修复 / Suggested minimal fix
在从父会话投影 child tools 时,把
intercom作为 child-ineligible tool 过滤掉,同时继续从 child resources 中排除pi-intercom,并保持父会话工具不变。资源排除与 requested-tool preflight 最好共享同一 child-ineligible policy,避免“扩展按设计移除,但工具仍被声明为必需”的不一致。建议增加两个回归测试:
intercom时,Direct Subagent 能启动,child 中无intercom,父会话仍保留该工具。agent()能启动并保持相同边界。隐私说明 / Privacy
此报告未包含凭据、用户目录、项目路径、项目名称、session ID、会话内容、Provider/模型身份或私有日志。