iiRecord
Agentic AI Atlas · GAP-AGENT-001: Sub-Harness Invocation with Isolation
page:docs-harness-features-backlog-gaps-agent-delegation-gap-agent-001a5c.ai
II.
Page reference

page:docs-harness-features-backlog-gaps-agent-delegation-gap-agent-001

Reading · 2 min

GAP-AGENT-001: Sub-Harness Invocation with Isolation reference

Invoke sub-harnesses with isolated context, model override, and independent run directories. Reframed from CC subagent concept to babysitter sub-harness invocation model where the orchestrator delegates work to isolated harness instances.

Pagewiki/docs/harness-features-backlog/gaps/agent-delegation/GAP-AGENT-001.mdOutgoing · 0Incoming · 1

GAP-AGENT-001: Sub-Harness Invocation with Isolation

FieldValue
Categoryagent-delegation
PriorityHigh
EffortXL
StatusPartial

Description

Invoke sub-harnesses with isolated context, model override, and independent run directories. Reframed from CC subagent concept to babysitter sub-harness invocation model where the orchestrator delegates work to isolated harness instances.

Current State

invokeHarness() spawns harness CLIs. Pi adapter supports programmatic sessions via PiSessionHandle. However: no context isolation between delegated tasks, no model override (harness CLI decides model), no worktree management, no background execution with progress tracking.

Target State

Sub-harness invocations create child runs with isolated context. Parent run tracks child runs. Model override per invocation. Child results aggregated into parent journal. Progress tracking for long-running sub-invocations.

Dependencies

**Merged**: GAP-TOOLS-013 (Agent/Subagent Tool) is covered by this gap. The original tool gap described invoking sub-agents from within tasks -- this is the same concept as sub-harness invocation with isolation, reframed for babysitter's orchestration model.

Key Files

ComponentPath
Harness invokerpackages/sdk/src/harness/invoker.ts
Pi session wrapperpackages/sdk/src/harness/piWrapper.ts
Harness adapterspackages/sdk/src/harness/

Recommendation

Phase 3-4 implementation. Phase 3: isolated child runs with context separation. Phase 4: background execution, progress tracking, and worktree integration.