claude-code runner invokes the claude CLI binary as a subprocess rather than using the SDK in-process. This produces the same model output as claude-sdk but runs in a separate process, which can be useful for isolation, reproducibility, or when you want full control over the claude binary version independently of the RemoteAgent package.
Requirements
-
The
claudeCLI installed globally: -
An Anthropic API key. The
claudebinary reads it from the same local config RemoteAgent uses, or from theANTHROPIC_API_KEYenvironment variable. - Node.js 20 or later.
Setup
claude-code when prompted by the interactive wizard.
Difference from claude-sdk
Both runners use the same underlying Claude model and produce equivalent output. The key differences are:| claude-sdk | claude-code | |
|---|---|---|
| Execution | In-process (Node.js) | Subprocess (claude binary) |
| Startup overhead | None | ~200–500ms per invocation |
| Process isolation | Shared with agent | Separate OS process |
| Binary version control | Tied to SDK version in package | Independent — update with npm update -g @anthropic-ai/claude-code |
| Error output | Structured SDK errors | Raw CLI stderr |
claude-sdk is the better choice. Use claude-code if you specifically need process isolation or want to pin the claude binary to a particular version.
How it works
The runner executes:--dangerously-skip-permissions flag is required because the agent runs non-interactively — there is no user present to approve individual tool calls. RemoteAgent runs this on your own machine, so the permissions boundary is the same as running claude manually.
Output is captured from stdout and streamed back to the Redis output channel chunk by chunk.