Claude Agent SDK: From the Command Line into Xcode — and into Production
The Claude Agent SDK turns the Claude Code experience into a programmable runtime for production AI agents. With Apple Xcode 26.3 integrating it natively, subagents for task delegation, hooks for audit, and sessions for multi-step workflows, the SDK is becoming a real platform. A look at what it does, how it works, and what I'm considering building on top of it.

Datum
I remember the first time I typed claude in a terminal and watched it navigate through my code, find a bug, and fix it. It felt like a curiosity back then — impressive, but not really part of any serious workflow. That has changed.
The Claude Agent SDK turns that experience into something you can ship. It is the same agent loop that powers Claude Code, packaged as a library you embed in your own applications. And the recent integration into Apple Xcode 26.3 makes clear that Anthropic is treating this as a real platform, not a side project.
What the SDK actually is
Anthropic renamed the Claude Code SDK to the Claude Agent SDK in late 2025. The name change matters. "Code SDK" suggested something narrowly scoped to developer tooling. "Agent SDK" is more honest about what it actually does: it gives you an autonomous, tool-using runtime you can drop into any application that needs AI to take actions, not just answer questions.
The Python package is at v0.1.48, TypeScript at v0.2.71. Both are under 1.0, but the API is stable and teams are running it in production.
The core idea is straightforward. Instead of building your own tool loop — send prompt, check stop reason, call tool, send result back, repeat — the SDK handles that for you. You write a prompt, pass in the tools you want to allow, and the agent runs until it is done:
import asyncio
from claude_agent_sdk import query, ClaudeAgentOptions
async def main():
async for message in query(
prompt="Find and fix the bug in auth.py",
options=ClaudeAgentOptions(allowed_tools=["Read", "Edit", "Bash"]),
):
print(message)
asyncio.run(main())
That is a complete agent that reads a file, finds a problem, and fixes it. No manual orchestration required.
Subagents, Hooks, and Sessions
Three features make the SDK usable for real production systems.
Subagents let a main agent delegate tasks to specialised child agents, each with its own instructions and a restricted set of tools. This is useful for long-running workflows where a single agent context would become unreliable, and it gives you meaningful access control — a code review agent that can only read, never write.
Hooks are callbacks you attach to specific points in the agent lifecycle: PreToolUse, PostToolUse, Stop, SessionStart, and others. They let you log what the agent does, block certain actions before they run, or collect metrics — without touching the agent loop itself. For production, this is the piece I care most about. I want to know what my agents are doing.
Sessions let an agent pick up where it left off. You capture a session ID from one run and pass it to the next. The agent remembers the context it built up previously, which is the foundation for multi-step workflows where you do not want to start from scratch on every request.
Xcode 26.3: What native integration looks like
On 3 February 2026, Xcode 26.3 shipped as a Release Candidate for Apple Developer Program members, with the Claude Agent SDK built in natively — not as a plugin, but as a first-class part of the IDE.
The meaningful part is that Claude can access Xcode Previews. It does not just read your SwiftUI code; it sees how the view actually renders. If there is a layout issue, the agent can spot it visually, trace it to the source, propose a fix, and then verify the result in the preview — a closed loop without the developer manually switching back and forth.
Xcode 26.3 also exposes its features via MCP. That means you can stay in the terminal with Claude Code and still access previews. Two workflows, one integration.
What I'm considering building on this
Shipwright today runs locally in Claude Code — same Agent SDK, terminal-based, Markdown files for state. It works well for developers who live in the CLI. But I keep hearing the same question: what about teams that want the structured SDLC pipeline without the terminal?
That's the idea behind Shipwright Hosted — a web UI on top of the same engine. You'd describe what you want to build in a chat. The agent asks clarifying questions, writes the spec, decomposes it into tasks, and you watch the agents work in real time: one decomposes requirements, another writes code with TDD, another runs security scans. All visible, all auditable. Results stored in a database, not scattered across files. Team collaboration built in.
The tech stack would be straightforward: TypeScript backend with Hono, Claude Agent SDK, Next.js frontend, SQLite for zero-config deployment. docker compose up and you're running — on any infrastructure.
I'm still deciding what priority this version of Shipwright should have. The SDK makes it technically feasible — subagents, hooks, and sessions give you everything you need for a multi-phase pipeline with real-time visibility. The question is whether enough teams want a hosted, visual version of what Shipwright already does in the terminal.
If that sounds like something your team would use, I'd genuinely like to hear from you.
→ Shipwright Hosted — Learn more and register interest
Sources
