Harnesses and models
This page covers choosing the agent (harness) a sandbox runs, passing flags through to it, and choosing how its model calls are paid: your own Claude or ChatGPT plan, or your own API key.
-
Pick an agent. Name it after
run.Terminal window droneship run claude # Claude Codedroneship run codex # OpenAI Codex CLI -
Choose the model with
--model: an alias such assonnetoropus, or a full model id. It works forclaudeandcodex, in a live session or a prompt run (-p).Terminal window droneship run claude --model opusdroneship run claude -p "fix the flaky test in tests/test_api.py" -d --model sonnetIn a live session, pass other flags through to the agent after
--. A prompt run passes no flags to the agent, and refuses any after--.Terminal window droneship run claude -- --verbose -
Choose how it pays for the model: your own API key, or your own plan.
Terminal window # your Anthropic API keydroneship run claude --byok ANTHROPIC_API_KEY# your Claude Pro/Max plandroneship run claude --subscriptionWith no key sent,
claudeandcodexuse the API key you saved in the console, if you saved one (below). Otherwise, on a terminal, they use your plan: you sign in inside the sandbox. Forcodex, the plan is your ChatGPT plan.
The agents
Section titled “The agents”| Agent | What runs | How you reach it |
|---|---|---|
claude |
Claude Code | Your terminal |
codex |
OpenAI Codex CLI | Your terminal |
Registry ids such as claude-code also work.
--askis forclaudeonly. Claude Code runs without asking before each command, because the sandbox is the boundary.--askbrings the prompts back.
How the agent reaches its model
Section titled “How the agent reaches its model”Every agent calls its model through the Highflame AI Gateway unless you pass --direct. The gateway applies your policy and measures spend, which is what fills the AI spend column in the console.
You pay for the model calls, with your own API key or your own plan. On the gateway, your key is held by a sidecar outside the sandbox.
The choices:
Your own plan (--subscription). For claude (Claude Pro or Max) and codex (ChatGPT). You sign in inside the sandbox, as you would on your laptop, and model calls bill to your plan. The sign-in stores a long-lived credential in the sandbox, so a plan launch can’t run at --isolation KERNEL. Interactive sessions only.
Your own API key (--byok). Name the environment variable that holds the key. The CLI reads the value from your environment, not from the command line, and remembers the name for this profile, so you pass it once.
export ANTHROPIC_API_KEY=sk-ant-...droneship run claude --byok ANTHROPIC_API_KEYThe variables each agent accepts are ANTHROPIC_API_KEY or CLAUDE_CODE_OAUTH_TOKEN (below) for claude, and OPENAI_API_KEY for codex. Your key still goes through the gateway. --no-byok stops sending it and forgets the remembered name.
A key saved in the console. On the console’s Settings page, under Model keys, save your own Anthropic or OpenAI API key for the project. Only you can change it, and nobody can read it back. A claude or codex launch that sends no key uses it, and says so:
Using your saved Anthropic key; --sub uses your plan instead.It works for prompt runs too. On an interactive launch, --byok and --subscription take its place. On a prompt run, --byok and an exported key do. --direct never uses it.
Your plan’s token (CLAUDE_CODE_OAUTH_TOKEN). For claude only. Run claude setup-token on your laptop and export the token it prints. Model calls then bill to your Claude Pro or Max plan, with nobody signing in inside the sandbox, so this is how a prompt run uses your plan. Like a key, the token stays in the gateway sidecar, outside the sandbox.
claude setup-tokenexport CLAUDE_CODE_OAUTH_TOKEN=sk-ant-oat01-...droneship run claude -p "fix the flaky test in tests/test_api.py" -dAn interactive session takes it with --byok CLAUDE_CODE_OAUTH_TOKEN. It doesn’t work with --direct.
Direct to the provider (--direct). --direct skips the gateway. It needs --byok or --subscription, and model calls then bypass gateway policy and spend metering (the KERNEL isolation floor also drops). Routing through the gateway is the default and needs no flag.
With no terminal (in CI, say), nobody can sign in to a plan, so send a key or your plan’s token with --byok, or save a key in the console. With no key sent and none saved, the launch stops before anything starts. --direct never uses a saved key, so with --direct you must send one.
More: droneship run, Harness reference, Isolation and identity, Tools and MCP.
- Background runs and logs: hand Claude a task with
-p. - Pair with an agent: work alongside Claude live.
- Egress: what the sandbox can reach.