feat: add silent subagent handoff mode#8192
Conversation
There was a problem hiding this comment.
Sorry @Ayleovelle, your pull request is larger than the review limit of 150000 diff characters
There was a problem hiding this comment.
Code Review
This pull request introduces a 'silent' handoff mode for subagents, enabling private task execution where tool calls and raw results are hidden from the end user. Key changes include updating the HandoffTool schema, implementing message filtering during serialization to exclude private tool interactions, and enhancing the FunctionToolExecutor to handle silent mode resolution and toolset restriction. Additionally, the subagent orchestrator and dashboard UI were updated to support this configuration, supported by new unit and integration tests. I have no feedback to provide.
f2a2813 to
8a3a262
Compare

Fixes #8181.
This PR adds a silent SubAgent handoff mode so the main agent can delegate private intermediate work to a SubAgent, consume the SubAgent result, and still answer the user without exposing the internal handoff tool call/result.
Modifications / 改动点
Add
mode: normal | silentsupport to SubAgent handoff tools and allow each SubAgent to define adefault_handoff_mode.Hide silent SubAgent handoff
tool_call/tool_call_resultevents from user-facing responses while preserving the tool result in the main agent context.Prevent silent SubAgents from directly calling
send_message_to_user, and keep silent handoff messages out of persisted checkpoints.Add runtime logs that distinguish
子代理静默调用=开启and子代理静默调用=未开启, including whether the mode came from default config or an explicit tool argument.Expose the WebUI toggle as
子代理静默调用, with updated zh-CN / en-US / ru-RU translations and config API compatibility.Add regression tests for silent/default handoff behavior, checkpoint persistence filtering, logging, and SubAgent config loading.
This is NOT a breaking change. / 这不是一个破坏性变更。
Screenshots or Test Results / 运行截图或测试结果
Dark mode WebUI screenshot was captured locally at
data/temp/subagent-silent-toggle-dark.png, showing the子代理静默调用toggle enabled.Local deployment verification:
http://localhost:6185and dashboard athttp://localhost:3000.gpt-5.5, and passed provider health check.tool_call/tool_call_resultevents.子代理静默调用=开启vs子代理静默调用=未开启.Checks:
Checklist / 检查清单
requirements.txtandpyproject.toml. / 我确保没有引入新依赖库,或者引入了新依赖库的同时将其添加到requirements.txt和pyproject.toml文件相应位置。