Skip to content
This repository was archived by the owner on Jul 15, 2026. It is now read-only.

[dev-buddy] Lightweight sub-agent alternatives #75

Description

@Z-M-Huang

Context

The Agent SDK spawns a full Claude Code process per subprocess — a heavy Node.js runtime with 20-30s startup time and significant memory usage. For pipeline stages that only need simple API calls (e.g., a quick review pass), this overhead may be excessive.

This issue tracks investigation into lighter alternatives for sub-agent execution.

Alternatives to Investigate

1. Direct Anthropic API calls with tool loop

  • Skip the Agent SDK entirely for simple tasks
  • Use @anthropic-ai/sdk to make raw Messages API calls
  • Implement a minimal tool loop (read file → respond → done)
  • Startup: near-instant (no CC process)
  • Downside: must implement tool execution manually

2. Lighter agent frameworks

  • Investigate frameworks that provide agent loops without full CC overhead
  • e.g., Vercel AI SDK, LangChain.js, or custom minimal loop
  • Trade-off: less CC integration but faster startup

3. Agent SDK optimizations

  • Profile the Agent SDK subprocess startup
  • Identify which CC initialization steps are unnecessary for review-only tasks
  • Propose SDK configuration to reduce startup overhead

Acceptance Criteria

  • Benchmark: Agent SDK subprocess startup time and memory usage (from spike)
  • Prototype: direct API call with tool loop for a simple review task
  • Compare: startup time, memory, latency for each approach
  • Document: trade-offs and recommendations
  • Decision: which approach (if any) to adopt for which pipeline stages

Priority

Low — the Agent SDK approach works and should be used for Phase 1. This investigation is for future optimization.

Dependencies

  • Requires performance data from the Agent SDK direct-connect spike

Metadata

Metadata

Assignees

No one assigned

    Labels

    dev-buddydev-buddy plugin — multi-AI orchestrationfutureFuture work — investigation needed

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions