Problem / 问题
Subagents already inherit permission mode (permission: inherit) and can inherit the session model (empty model pin). They do not inherit the parent turn's tools / skills / plugin tools.
A built-in explorer is:
tools: [Read, Glob, Grep, Bash]
The assignable whitelist is hard-coded:
SUBAGENT_ASSIGNABLE_TOOLS = [Read, Glob, Grep, BrowserPreview, Bash, Edit, Write]
DEFAULT_SUBAGENT_TOOLS = [Read, Glob, Grep]
Settings copy is explicit: “Read-only by default. A delegate never inherits anything you don't grant here.”
So a parent Agent with Skill, MCP, plugin tools, ToolSearch, and the same workspace cannot give any of that to the worker it just spawned. Typical fallout on 0.14.6:
- Parent is tracing PI-Desktop internals. Explorer has no
Skill, no asar-aware tools, and guesses Composer.tsx / truncated scratch paths → Read directory (INVALID_ARGUMENT) and os error 3.
- Parent loaded
delivery-contract via Skill. Explorer cannot load it even if the task matches.
- Parent can
ToolSearch on-demand tools. Explorer cannot.
模型 pin 和权限已经能跟会话走;工具能力不能。主会话刚派出去的活,子代理却是另一套残缺工具箱。
Proposed change / 期望改动
Add an inherit path for tools, same idea as permission/model, without turning every explorer into a nested Agent.
Suggested frontmatter:
tools: inherit # parent's currently enabled tool names, minus a deny list
# or
tools: [inherit, Bash] # inherit + extras still on the assignable list
Default for builtins can stay today's whitelist (explorer stays read-mostly). Default for user-defined subagents, or a Settings toggle:
Subagents inherit the parent turn's tools (except Task / mode-switch / Ask)
Deny list (never inherit, even with inherit):
| Keep off delegates |
Why |
Task / TaskWait / TaskList / TaskStop |
no nested fan-out |
EnterPlanMode / EnterGoalMode |
mode is the parent's |
asktool |
subagent cannot see the user |
Allow inherit (parent has them ⇒ delegate gets them):
Skill (and the same pluginSkills catalog the parent already received)
ToolSearch if the parent is using on-demand tools
- plugin / MCP tools the parent was allowed to call
Read / Glob / Grep / Bash / Edit / Write / BrowserPreview as today
Runtime shape:
- When spawning
SubagentRun, build tools from definition.tools. If the list contains inherit (or a new inheritTools: true), union with parent.availableToolNames minus the deny list.
- Pass the parent's
pluginSkills into the delegate Agent so Skill { id } resolves. Do not require the child to ToolSearch for Skill if the parent already had it as a core/on-demand tool.
- Keep workspace + scratch roots the same as the parent (they already share
projectPath / scratchDir — the missing piece is tools, not cwd).
- Settings: checkbox 「子代理继承当前会话工具」 / Inherit parent tools, default off for builtins, on for user agents — or honor
tools: inherit in the markdown.
UI toolsHint today says the opposite; update it to: inherit is opt-in, mutating tools still need an explicit grant or inherit.
Alternatives / 其他方案
- Put
Skill on SUBAGENT_ASSIGNABLE_TOOLS only: helps skill routing, still no MCP/plugin tools, still a second catalog.
- Always give explorer
*: too wide (fixer-level writes on a search agent).
- Prompt the parent “pass every path in the Task text”: works around missing Skill/ToolSearch, still a tax on every delegation.
Additional context / 补充信息
PI-Desktop 0.14.6 · Windows.
Already inherited today:
permission default inherit
- empty
model → session model
- thinking “Same as the session”
Not inherited: tool names, Skill catalog, plugin/MCP tools.
Code:
packages/shared SUBAGENT_ASSIGNABLE_TOOLS / DEFAULT_SUBAGENT_TOOLS / parseSubagentDefinition
packages/agent-runtime/src/subagent-definitions.ts builtin explorer/fixer docs
packages/agent-runtime SubagentRun (tools: opts.tools) vs parent Runtime.buildTools() (skillTools only if mode === "agent")
- Settings i18n
toolsHint
Related: #204 (Skill as Agent core tool) — even if Skill is core on the parent, delegates still cannot call it until it is assignable or inherited.
Problem / 问题
Subagents already inherit permission mode (
permission: inherit) and can inherit the session model (emptymodelpin). They do not inherit the parent turn's tools / skills / plugin tools.A built-in
exploreris:The assignable whitelist is hard-coded:
Settings copy is explicit: “Read-only by default. A delegate never inherits anything you don't grant here.”
So a parent Agent with Skill, MCP, plugin tools, ToolSearch, and the same workspace cannot give any of that to the worker it just spawned. Typical fallout on 0.14.6:
Skill, no asar-aware tools, and guessesComposer.tsx/ truncated scratch paths →Readdirectory (INVALID_ARGUMENT) andos error 3.delivery-contractviaSkill. Explorer cannot load it even if the task matches.ToolSearchon-demand tools. Explorer cannot.模型 pin 和权限已经能跟会话走;工具能力不能。主会话刚派出去的活,子代理却是另一套残缺工具箱。
Proposed change / 期望改动
Add an inherit path for tools, same idea as permission/model, without turning every explorer into a nested Agent.
Suggested frontmatter:
Default for builtins can stay today's whitelist (explorer stays read-mostly). Default for user-defined subagents, or a Settings toggle:
Deny list (never inherit, even with
inherit):Task/TaskWait/TaskList/TaskStopEnterPlanMode/EnterGoalModeasktoolAllow inherit (parent has them ⇒ delegate gets them):
Skill(and the samepluginSkillscatalog the parent already received)ToolSearchif the parent is using on-demand toolsRead/Glob/Grep/Bash/Edit/Write/BrowserPreviewas todayRuntime shape:
SubagentRun, buildtoolsfromdefinition.tools. If the list containsinherit(or a newinheritTools: true), union withparent.availableToolNamesminus the deny list.pluginSkillsinto the delegate Agent soSkill { id }resolves. Do not require the child to ToolSearch for Skill if the parent already had it as a core/on-demand tool.projectPath/scratchDir— the missing piece is tools, not cwd).tools: inheritin the markdown.UI
toolsHinttoday says the opposite; update it to: inherit is opt-in, mutating tools still need an explicit grant or inherit.Alternatives / 其他方案
SkillonSUBAGENT_ASSIGNABLE_TOOLSonly: helps skill routing, still no MCP/plugin tools, still a second catalog.*: too wide (fixer-level writes on a search agent).Additional context / 补充信息
PI-Desktop 0.14.6 · Windows.
Already inherited today:
permissiondefaultinheritmodel→ session modelNot inherited: tool names, Skill catalog, plugin/MCP tools.
Code:
packages/sharedSUBAGENT_ASSIGNABLE_TOOLS/DEFAULT_SUBAGENT_TOOLS/parseSubagentDefinitionpackages/agent-runtime/src/subagent-definitions.tsbuiltin explorer/fixer docspackages/agent-runtimeSubagentRun(tools: opts.tools) vs parentRuntime.buildTools()(skillToolsonly ifmode === "agent")toolsHintRelated: #204 (Skill as Agent core tool) — even if Skill is core on the parent, delegates still cannot call it until it is assignable or inherited.