Local-first AI coding agent desktop: Electron + Rust host core + pi Agent Harness + user-installable plugins
TypeScript ai-agentcoding-agentdesktop-appelectronglobali18nlocal-firstmcppipi-agentpi-desktoppluginsreactrusttypescript
ADR 0246: Opt-in subagent inheritance of the parent tool catalog
- Status: Accepted
- Date: 2026-09-14
- Related: ADR 0062, ADR 0089, ADR 0100, D201, D415, issue #215, PR #319
Context
ADR 0062 made a subagent a bounded worker limited to
SUBAGENT_ASSIGNABLE_TOOLS, deliberately excluding plugin tools, Skill,
ToolSearch, mode tools, and Task. Permission mode and the model pin already
follow the parent, but tool capability did not, so a parent holding Skill, MCP,
or plugin tools could not share them with a worker it spawned, and always
inheriting would make every delegation as dangerous as the session.
Decision
- Frontmatter may opt a definition in with
tools: inheritortools: [inherit, Bash].inheritsetsSubagentDefinition.inheritTools, any extra name must still be assignable, and builtins do not opt in. - At
Taskspawn,resolveSubagentToolNamesunions the session runtime's livetoolCatalogkeys, including deferred plugin and MCP tools, with declared extras and dropsSUBAGENT_INHERIT_DENY_TOOLS:Task,TaskWait,TaskList, andTaskStop(no nested fan-out),EnterPlanModeandEnterGoalMode(mode stays the parent's),asktool(a delegate has no user),new_context(compaction is a parent flag), andToolSearch(it activates tools on the parent catalog). The child receives the allowed catalog withoutToolSearch, and inherit is deliberately stronger than the parent's first-request set. - Spawn-time names drive the delegate tool list, mutation framing,
search/edit/Bash guidance, and, when
Skillis present, the same# Skillscatalog the parent received; the Task catalog printsinheritplus extras instead of listing every MCP name. - host-core's user-subagent scanner keeps the
inherittoken intoolsso atools: inherit-only definition still appears inagents.activeand round-trips through Settings without the editor stripping it. - Documents that omit
toolsstay read-only (Read, Glob, Grep), andtools: "*"still means the assignable tools rather than the session catalog.
This amends ADR 0062 §2 and its rejected "let delegates inherit the parent's tools" alternative: inherit is now an explicit document opt-in with a deny list.
Consequences
- A user-owned worker can call Skill, MCP, and plugin tools the parent already had, without turning builtins into nested agents.
- Inheriting Bash, Edit, or Write inherits mutation; permission mode and the external-path gate are unchanged.
- The grant stays readable in Markdown and Settings, and a child cannot mutate
parent runtime state through
ToolSearchornew_context.
Alternatives
- Always inherit for user agents: rejected as a hidden default where Markdown
opt-in matches
permission: inherit. - Add
Skillto the assignable list only: rejected because it leaves MCP and plugin tools as a second catalog.