You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ADF spawns Claude agents as claude -p subprocesses with stdout/stderr capture. This causes SIGPIPE bugs, fragile output parsing, cold-start waste, and no native cost tracking. The Claude Agent SDK (renamed from Claude Code SDK) provides query() async iterator with typed hooks, native session resume/fork, and in-process cost tracking.
Proposal
Replace subprocess spawning for Claude-based agents with Agent SDK query() calls. Codex agents remain as subprocesses (no SDK equivalent).
Context
ADF spawns Claude agents as
claude -psubprocesses with stdout/stderr capture. This causes SIGPIPE bugs, fragile output parsing, cold-start waste, and no native cost tracking. The Claude Agent SDK (renamed from Claude Code SDK) providesquery()async iterator with typed hooks, native session resume/fork, and in-process cost tracking.Proposal
Replace subprocess spawning for Claude-based agents with Agent SDK
query()calls. Codex agents remain as subprocesses (no SDK equivalent).Migration Strategy
query()and forwards typed JSONL events to stdout using the RPC envelope (Implement JSONL RPC envelope for agent-orchestrator communication #688)What This Eliminates
resume=session_id)ClaudeSDKClienthandles state)Open Question: Bridge Architecture
Sub-issues (to be created during design phase)
References
cto-executive-system/knowledge/claude-agent-sdk-reference.mdcrates/terraphim_spawner/src/lib.rscto-executive-system/plans/adf-architecture-improvements.md(item 2.1)