Skip to content

subagents: fork mode — context-inheriting children (prompt-cache-cheap) #34

Closed

Description

@JAORMX

Context

All mecatl children start with a fresh context; the parent must serialize everything into prompt. Claude Code's fork subagents (v2.1.117+) inherit the parent transcript instead — nearly free on cost because the parent's byte-stable prompt prefix is already cached, and strictly better for "continue this exact investigation with my full context" delegations. (docs/harnesses/09-agent-primitives-evaluation.md, field-gap #3.)

Shape

  • A fork: true Subagent arg (mutually exclusive with agent/resume): the child session seeds from a deep copy of the parent conversation (ReplaceHistory-style, tool-pairing-validated) instead of empty.
  • The stateless-adapter replay property makes this byte-cheap; compaction state copies as-is.
  • Trust posture needs design: the forked history contains tool results the parent already vetted — no new untrusted ingress, but the child's system prompt differs (explorer), so decide what rides the system layer vs the copied history.
  • Catalog stays the read-only explorer set; no nesting, budgets tighten-only — all unchanged.

Why

The "investigate what we were just discussing" delegation currently forces lossy prompt-summarization by the parent model.

Activity

  1. added
    enhancement
    on Jun 10, 2026
  2. JAORMX commented on Jun 14, 2026

    @JAORMX
    ContributorAuthor

    Shipped in 3663c59 (on main, CI green): Subagent fork mode (context-inheriting children). Auto-close was missed because the commit used a bare (#34) reference instead of Closes #34.

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

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions