// With the Claude Code SDK directly
import { query, type SDKMessage } from '@anthropic-ai/claude-code';
import { spawn } from 'child_process';
import { mkdtempSync, rmSync } from 'fs';
import { tmpdir } from 'os';
import { join } from 'path';
// You own: ephemeral sandbox, git clone, branch policy, commit + push,
// streaming protocol, retry on 429, multi-provider routing, abort
// handling, cost accounting, MCP server config, working-dir lifecycle.
const dir = mkdtempSync(join(tmpdir(), 'task-'));
spawn('git', ['clone', repoUrl, dir]).on('exit', () => { /* … */ });
for await (const m of query({ prompt, options: { cwd: dir /* + everything else */ } })) {
// 30+ lines just to render tool calls, accumulate text deltas,
// commit changes, push the branch, surface auth errors…
}// With OrchestraCode
const stream = await fetch('https://api.orchestracode.dev/v1/tasks', {
method: 'POST',
headers: {
'authorization': `Bearer ${ORCH_KEY}`,
'x-github-token': GH_TOKEN,
'x-model-key': ANTHROPIC_KEY,
},
body: JSON.stringify({ repo, branch, task, model: 'claude-sonnet-5' }),
});
// → stream of typed events: status / assistant / tool_use / tool_result / git / resultA fresh, per-task working directory with node, npm, git, jq, ripgrep. Booted before the agent's first tool call.
Clone-with-token, feature-branch policy, atomic commit-then-push, retry on transient auth, friendly error if the token rotated.
429 with Retry-After, 5xx with exponential backoff, timeout and network drop retries. All wrapped around the SDK call.
A typed event stream (status / assistant / tool_use / tool_result / git / result) that survives client disconnects.
Same payload routes Sonnet, GPT, GLM, DeepSeek, Qwen. Switch by changing `model`, no per-provider plumbing.
Prompt tokens, completion tokens, cache reads, dollar cost. Itemised so you can pass-through bill.
Honest framing: we're a wrapper around agentic coding SDKs such as Claude Code's, plus a few peer model providers. The SDK is great; running it in production is the part that bites. We're the part that bites, so you don't.
The agent runs on your computer with the Claude, Codex or OpenRouter account you already have. Your code stays there. Model usage is billed by your provider; we never resell it.
Run coding agents on your own computer.
Take your desktop tasks with you, and work on them together.
Tell us how you'd use an agentic coding SDK if the infra was already handled. We'll send back an API key and a working example for your stack.