Skip to content

Opt-in extension inheritance for children (extension-provided model providers are unreachable) #1

Description

@Sokoshy

Problem

Child sessions are created with noExtensions: true (hardcoded in extensions/subagent.ts), so extension-provided model providers are invisible to children.

Concretely: my main model comes from a custom provider extension (registerProvider in a pi package). The parent session resolves command-code/xiaomi/mimo-v2.6-flash fine, but any agent_run child with an inherited (or explicit) command-code/* model fails before its first turn:

[scout · scout-1 · error · 0 turns]
Failed before the child started: No API key found for command-code.

The provider isn't missing credentials — it simply isn't registered in the child session.

Request

An opt-in, per-agent way to let a child load extensions, defaulting to today's behavior (none). Something in the spirit of the existing inherit_skills / system_prompt_mode frontmatter keys, for example:

---
description: Scout with corporate model access
tools: read, grep, find, ls
model: command-code/xiaomi/mimo-v2.6-flash
inherit_extensions: true
# or, preferably, an allowlist:
extensions: pi-commandcode-provider
---

Suggested semantics:

  • inherit_extensions unset / false (or no extensions: list) → noExtensions: true, exactly as today. Safe default preserved.
  • inherit_extensions: true → child loads the parent's extensions.
  • extensions: <list> → child loads only the named extensions (mirrors the tools: allowlist philosophy: enumerate what the child may touch).

Why allowlist matters

Fully inheriting extensions would also hand the child every interactive/orchestration extension (ask-user-question, other subagent orchestrators, MCP adapters…), which is precisely the blast radius noExtensions: true was designed to close. A named allowlist keeps the scope bounded: in my case the child needs exactly one extension (the model provider), nothing else.

A cheaper moitié alternative, if full extension loading is off the table: allow inheriting providers only (inherit_providers: true / providers: [...]), since model access is the most common legitimate need and providers don't add tools to the child's surface.

Environment

  • @pify/subagent 0.16.1 (npm)
  • Pi 0.87.1
  • Custom provider via a pi extension package (registerProvider)

Thanks for the great work on the suite — happy to test a preview build.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions