ADR 0246: Opt-in subagent inheritance of the parent tool catalog
- Status: Accepted
- Date: 2026-09-14
- Deciders: PI-Desktop core
- Related: ADR 0062, ADR 0089, ADR 0100, D201, D415, issue #215, PR #319
Context
ADR 0062 made a subagent a bounded worker: it could only receive tools from SUBAGENT_ASSIGNABLE_TOOLS (Read, Glob, Grep, BrowserPreview, Bash, Edit, Write). Plugin tools, Skill, ToolSearch, mode tools, and Task were out of reach on purpose so a definition remained the place a reader could see what a delegate may do.
Permission mode (permission: inherit) and the session model (empty model pin) already follow the parent. Tool capability did not. A parent that had loaded Skill, MCP, or plugin tools could not give any of that to a worker it just spawned. Builtins that stay on today's whitelist (explorer, code-reviewer) are still the right default; user-defined workers that should share the parent catalog had no opt-in.
Always inheriting would make every delegation as dangerous as the session. Putting Skill alone on the assignable list would still leave MCP and plugin tools as a second catalog.
Decision
Frontmatter may opt a definition into parent-tool inheritance:
yamltools: inherit # or tools: [inherit, Bash]inheritsetsSubagentDefinition.inheritTools. Extra names still have to be onSUBAGENT_ASSIGNABLE_TOOLS. Builtins do not opt in.At
Taskspawn,resolveSubagentToolNamesunions the session runtime's livetoolCatalogkeys (including deferred plugin/MCP tools the parent is allowed to call) with any declared extras, then dropsSUBAGENT_INHERIT_DENY_TOOLS:Never inherited Why Task/TaskWait/TaskList/TaskStopno nested fan-out EnterPlanMode/EnterGoalModemode stays the parent's asktoola delegate has no user new_contextcompaction is a parent-runtime flag ToolSearchactivates deferred tools on the parent catalog The child receives the full allowed catalog without
ToolSearch. Inherit is stronger than the parent's first-request active set; that is the point of handing Skill/MCP/plugin tools to a worker.Spawn-time resolved names drive the delegate tool list, mutation framing, search/edit/Bash guidance, and — when
Skillis present — the same# Skillscatalog the parent already received. The Task catalog printsinherit(plus extras) rather than dumping every MCP name.host-core's user-subagent scanner keeps the
inherittoken intoolssotools: inheritalone still appears inagents.activeand round-trips through Settings. The editor exposes an inherit checkbox; saving must not strip the token.Default documents that omit
toolsstay read-only (Read, Glob, Grep).tools: "*"still means the seven assignable tools, not the session catalog. A session cannot lend mutation to a read-only delegate unless that definition opted into inherit.
This amends ADR 0062 §2 and the rejected alternative "Let delegates inherit the parent's tools": inherit is now an explicit document opt-in with a deny list, not silent session equality.
Consequences
- A user-owned worker can call Skill/MCP/plugin tools the parent already had, without turning explorer into a nested Agent.
- Inherit of Bash/Edit/Write is inheriting mutation. Permission mode and the external-path gate are unchanged;
permission: inheritstill follows the session. - Definitions remain the readable grant:
tools: inheritis visible in the Markdown and in Settings. - Child
ToolSearch/new_contextcannot mutate parent runtime state.
Alternatives considered
- Always inherit for user agents, never for builtins. Rejected as a hidden default. Markdown opt-in is the same shape as
permission: inherit. - Inherit only currently active tools. Rejected because MCP/plugin tools are deferred behind
ToolSearch; a worker would still lack the catalog the issue asked for, and inheritingToolSearchwould activate tools on the parent. - Add
SkilltoSUBAGENT_ASSIGNABLE_TOOLSonly. Rejected: no MCP/plugin tools, still a second catalog.