Replacing the Anthropic-only Claude Agent SDK with the pi harness for multi-provider agent nodes — migration, live proof, and the sub-workflow plan.
branch feat/pi-agent-backend
PR #9
579 tests pass
ruff + pyright clean
Layers 1 (LLM transport) and 2 (agent loop) were hard-bound to the Claude Agent SDK. They now delegate to pi --mode rpc. The engine seam run_agent_node(AgentConfig) → AgentOutcome is unchanged, so the orchestrator and its tests were untouched.
Two heavy deps removed (claude-agent-sdk, anthropic); pi is now a runtime dependency on PATH. Net −1443 / +1288 lines.
claude-agent-sdk + anthropic depsreport_outcome toolClaudeSDKError import/catch in the engineagent/pi_rpc.py — subprocess + JSONL transportagent/report_outcome.ts — the one tool, as a pi extension (ships in the wheel)pydantic as an explicit dep (was transitive)Same code, same report_outcome round-trip, three providers and three auth styles — only the provider/model string differed.
| Provider | Model string | Auth | Live result |
|---|---|---|---|
| Anthropic | anthropic/claude-haiku-4-5 | API key | ✓ 4.4s |
| OpenAI Codex | openai-codex/gpt-5.3-codex | ChatGPT subscription (OAuth) | ✓ 8.6s |
| Cerebras (GPT-OSS) | cerebras/gpt-oss-120b | API key | ✓ 1.2s |
A real run: one pi agent node (Cerebras) feeds a fan-out to three concurrent tool nodes, which fan back in at a join and route to exit. Completed clean.
implement reported SUCCESS in 1.14s (5061 in / 41 out tokens); three tool nodes ran concurrently (~5–7ms each); run COMPLETED.
house sub-workflow nodeNot built yet — deferred in SPEC §14. The plan (goal-subworkflow-house.md) adds a node that runs a child workflow in its own seeded sub-worktree, recombines on success, and maps the child's RunStatus to the node's OutcomeStatus.
NodeKind.SUBWORKFLOW + house shape mapworkflow=, resolve+validate child, forbid inside parallel regionschild_run_id journal fieldPhase 1 is the SPEC §5/§6/§14/§15 edit + two new REQ-…-SUBWORKFLOW ids — a sign-off gate before code, per AGENTS.md.
SPEC.md, goal-subworkflow-house.md, PR #9 on feat/pi-agent-backend.
Diagrams are inline SVG (no external assets).