Skip to content

Spawn: close pre-existing child-runtime semantic gaps #17

Description

@grzegorznowak

Context

Follow-up from PR #16 (Pi 0.80.8 spawn runtime compatibility). These behaviors predate that compatibility repair and should be addressed separately from its renderer, thinking-reporting, and compatibility-script fixes.

Scope

Executable tool inheritance

  • Define which parent tool sources child spawn supports: rediscovered project/user/package extensions, SDK customTools, inline/dynamic extension factories, CLI/additional extension paths, and custom resource-loader state.
  • Replace or constrain name-only inheritance so a documented inherited tool is present in the actual child registry with the intended implementation.
  • Prevent same-name rediscovery from silently substituting different child semantics.
  • Explicitly omit or diagnose unsupported source channels.
  • Update README wording to distinguish allowed names, actual registry entries, and semantic inheritance.
  • Add real-child integration tests for SDK-only, inline/dynamic, additional-path, and same-name collision cases.

Cancellation reason preservation

  • When signal cancellation occurs and prompt() resolves without assistant text, return an aborted outcome with the supplied reason before applying the generic no-output fallback.
  • Add regressions for cancellation with no text, cancellation after partial text, genuinely empty non-cancelled output, and existing stale/error precedence.

Acceptance criteria

  • Every tool documented as inherited executes the intended parent-visible implementation in a real child session.
  • Unsupported tool sources are explicitly excluded or diagnosed rather than silently allowlisted.
  • Parent overrides cannot silently become same-named builtins or rediscovered extensions in the child.
  • Empty-output signal cancellation preserves outcome: "aborted" and the cancellation reason.
  • Non-cancelled empty output and stale/error precedence retain their current behavior.

Non-goals

  • Serializing arbitrary closures or extension state without an explicit support decision.
  • Redesigning cleanup-error observability.
  • Handling hypothetical future rejection from Pi's currently non-rejecting AgentSession.abort().
  • PR Pi 0.80.8 spawn runtime compatibility #16 renderer recovery, effective-thinking reporting, compatibility-script portability, or CI matrix hardening.

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