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 JSON

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

Structured · live

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

Inspect the normalized record payload exactly as the atlas UI reads it.

File · wiki/docs/harness-features-backlog/gaps/agent-delegation/gap-agent-001.mdCluster · wiki
Record JSON
{
  "id": "page:docs-harness-features-backlog-gaps-agent-delegation-gap-agent-001",
  "_kind": "Page",
  "_file": "wiki/docs/harness-features-backlog/gaps/agent-delegation/gap-agent-001.md",
  "_cluster": "wiki",
  "attributes": {
    "nodeKind": "Page",
    "sourcePath": "docs/harness-features-backlog/gaps/agent-delegation/GAP-AGENT-001.md",
    "sourceKind": "repo-docs",
    "title": "GAP-AGENT-001: Sub-Harness Invocation with Isolation",
    "displayName": "GAP-AGENT-001: Sub-Harness Invocation with Isolation",
    "slug": "docs/harness-features-backlog/gaps/agent-delegation/gap-agent-001",
    "articlePath": "wiki/docs/harness-features-backlog/gaps/agent-delegation/GAP-AGENT-001.md",
    "article": "\n# GAP-AGENT-001: Sub-Harness Invocation with Isolation\n\n| Field | Value |\n|-------|-------|\n| Category | agent-delegation |\n| Priority | High |\n| Effort | XL |\n| Status | Partial |\n\n## Description\nInvoke 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.\n\n## Current State\ninvokeHarness() 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.\n\n## Target State\nSub-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.\n\n## Dependencies\n- [GAP-HADAPT-001](../harness-adaptation/GAP-HADAPT-001.md) -- capability-based routing for sub-harness selection\n- [GAP-SUBOBS-001](../subagent-observability/GAP-SUBOBS-001.md) -- streaming output from sub-harnesses\n\n**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.\n\n## Key Files\n| Component | Path |\n|-----------|------|\n| Harness invoker | `packages/sdk/src/harness/invoker.ts` |\n| Pi session wrapper | `packages/sdk/src/harness/piWrapper.ts` |\n| Harness adapters | `packages/sdk/src/harness/` |\n\n## Recommendation\nPhase 3-4 implementation. Phase 3: isolated child runs with context separation. Phase 4: background execution, progress tracking, and worktree integration.\n",
    "documents": []
  },
  "outgoingEdges": [],
  "incomingEdges": [
    {
      "from": "page:docs-harness-features-backlog",
      "to": "page:docs-harness-features-backlog-gaps-agent-delegation-gap-agent-001",
      "kind": "contains_page"
    }
  ]
}