ORCHESTRATOR (lightweight, Sonnet-tier)
├── PLANNER subagent (read-only tools, Opus)
├── REVIEWER subagent (read-only tools, Sonnet)
├── EXECUTOR subagent (read/write tools, Claude/Codex CLI)
└── VERIFIER subagent (read-only tools, Sonnet)
Epic — do not implement full refactor until trigger conditions are met.
Context
Inspired by Vercel open-agents subagent pattern. Current pipeline uses a single shared mutable
PipelineContextacross all phases with no context isolation. Toolset scoping relies on CLI flags (--disallowedTools,--sandbox).Proposed architecture
Each subagent:
Benefits
Trigger conditions (do when)
Current state
PipelineContext= single mutable object, mutated by all 14+ cross-phase handler callsbuildClaudeCommandper-phasephaseHints.allowedToolsfield exists but isn't wired uppackages/agents/src/tools/registry.tsbut only for OpenRouter harnessIncremental path — shipped ✅
Freeze read-only context snapshots per pipeline phase #127 — Freeze read-only context snapshots per phase✅ closedWire up declarative toolset scoping via provider config #128 — Wire up declarative toolset scoping via provider config✅ closedReset phase-specific context fields between pipeline transitions #129 — Reset phase-specific context fields between transitions✅ closedFull subagent refactor — deferred
snapshotPhaseInputinrunProviderPhasePipelineContextinto orchestrator state and phase payloadEpic — do not implement full refactor until trigger conditions are met.