Paths Subjects Questions Quizzes Pricing Search
Advanced Open Pro

Choosing Between the CLI and the Agent SDK

You're building an internal tool: a Python web service where a user submits a bug description through a form, and the service should run Claude Code against a checked-out copy of the repository, stream progress back to the user's browser as Claude works, and store the final diff for review — all without shelling out to a CLI and parsing stdout.

  1. Should this be built against the Agent SDK or the claude -p CLI invoked as a subprocess? Justify the choice against the specific requirements given.
  2. Name the two things the SDK gives you here that a subprocess-based approach would have to reconstruct by hand.
  3. If the same requirements were given but the service were written in Go instead of Python, would the answer change? Why or why not?

Share this question

← Back to Headless Mode, CI Automation & the Agent SDK practice

We use cookies for product analytics to improve OmniAtlas. See our Privacy Policy.