Configure Claude Code
Run Claude Code with account access or an API key and select its model settings.
Install
Section titled “Install”The agent image contains Claude Code. Remote sandboxes install claude if it is missing before the first turn; local host execution uses the executable already on your PATH.
- Pinned versionThe image and remote installation use
@anthropic-ai/claude-codeat the version inagentVersions.claude. - Remote installationnpm installs it under
~/.outpost-toolsin the sandbox. - Image only
bootstrap: falseondispatch()orcreateSandbox()skips installation; the image must provideclaude.
Sign in with your account
Section titled “Sign in with your account”Run claude, then /login, on the host. authentication: "account" copies the subscription login from ~/.claude/.credentials.json (or $CLAUDE_CONFIG_DIR/.credentials.json) into the sandbox’s private home.
On macOS, Claude Code keeps its login in the keychain by default, and Outpost never reads a keychain. Run claude setup-token instead and pass the printed token as a variable. It uses your Pro, Max, Team or Enterprise plan.
Choosing between account and API access, and where credentials go: Authentication. Vendor requirements: Claude Code authentication.
Use an API key
Section titled “Use an API key”authentication: "usage" passes ANTHROPIC_API_KEY. Requests are billed to your Anthropic API account, not to a subscription.
Choose a model and options
Section titled “Choose a model and options”Omit model to use Claude Code’s default. A model object adds an effort level and an output limit.
API reference: ClaudeSettings and AgentModel.
Available features
Section titled “Available features”Choose an agent compares these capabilities across agents.
- ConversationsCaptured after each turn, then resumed or forked in a new sandbox.
- SteeringInstructions join the running turn through its stream-json input, on every sandbox provider.
- Quota pausesA usage limit fails with code
quota, with the reset time when Claude reports it. - Fallback agentsAPI 5xx, overload and connection failures are classified as
unavailable. - ProgressTool calls, thinking and token usage per message, including cache tokens.
- MCP serversStdio and HTTP servers, excluded tools and host OAuth logins.
Limits
Section titled “Limits”- One credential: Declaring
ANTHROPIC_API_KEYwith account access, orCLAUDE_CODE_OAUTH_TOKENwith API access, fails before the turn starts. - Permissions: Without
permissions, headless turns run with--dangerously-skip-permissions. The sandbox, not the permission mode, is the isolation boundary. - Duplicate settings: Set
maxOutputTokensor aCLAUDE_CODE_MAX_OUTPUT_TOKENSvariable, not both.
API: createClaudeHarness · ClaudeSettings · createClaudeConversations · AgentAuthentication.