Skip to content

Subagents with scoped tools #97

@owainlewis

Description

@owainlewis

Summary

Add optional subagents with scoped tools, bounded turns, isolated transcripts, and clear handoff back to the parent agent.

Motivation

Subagents are a useful teaching and product feature, but they should remain an optional delegation layer rather than part of the core loop.

Scope

  • Introduce internal/subagent with a NoSubagents default or empty registry.
  • Add a registry for named subagent types.
  • Run child agents with explicit max turns and curated tool registries.
  • Keep child transcripts separate from the parent transcript.
  • Return a concise result back to the parent as tool output.
  • Propagate cancellation from parent to child.

Acceptance criteria

  • Parent agent can delegate to a registered subagent.
  • Unregistered subagents fail as recoverable tool errors.
  • Child agents cannot access tools outside their scoped registry.
  • Tests cover success, unknown subagent, max turns, and cancellation.

Agent Assessment

Risk: high
Type: feature
Agent-ready: no

Reason:
Subagents introduce new architecture, scoped tool boundaries, cancellation, and parent/child transcript semantics. This needs human design direction before execution.

Suggested plan:

  1. Confirm the subagent interface and registry shape.
  2. Split implementation into smaller tickets once design is accepted.
  3. Verify with tests for success, unknown subagent, max turns, and cancellation.

Human needed:
Choose the first narrow subagent slice and confirm the tool-scoping/runtime design.

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs:humanA human decision, clarification, or judgement call is requiredrisk:highHigh-risk issue requiring human-led work or explicit directiontype:featureNew user-facing or developer-facing capability

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions