Alternative to CLAUDE_CODE_OAUTH_TOKEN. Also supports comma-separated values
API_KEY
Yes
—
API key for MCP server
AGENT_ID
No
Auto-generated
Agent UUID. Keep stable for task resume
AGENT_ROLE
No
worker
Role: worker or lead
AGENT_NAME
No
Auto-generated
Display name for the agent
MCP_BASE_URL
No
http://host.docker.internal:3013
MCP server URL
SESSION_ID
No
Auto-generated
Log folder name
YOLO
No
false
Continue on errors
SYSTEM_PROMPT
No
—
Custom system prompt text
SYSTEM_PROMPT_FILE
No
—
Path to system prompt file
STARTUP_SCRIPT_STRICT
No
true
Exit on startup script failure
SHUTDOWN_TIMEOUT
No
30000
Grace period (ms) before pausing tasks
MAX_CONCURRENT_TASKS
No
1
Maximum parallel tasks per worker
SWARM_URL
No
localhost
Base domain for service URLs
LEAD_PORT
No
3020
Host port for lead service. Example variable used in docker-compose.example.yml — adjust to your setup. In isolated network namespaces all services can share the same port.
WORKER1_PORT
No
3021
Host port for worker-1 service. Example — see LEAD_PORT.
WORKER2_PORT
No
3022
Host port for worker-2 service. Example — see LEAD_PORT.
To distribute load across multiple Claude subscriptions, provide multiple credentials as comma-separated values:
# Multiple OAuth tokens — one is randomly selected per sessionCLAUDE_CODE_OAUTH_TOKEN=token1,token2,token3# Also works with API keysANTHROPIC_API_KEY=sk-key1,sk-key2
When a session is spawned, the runner splits the credential value by commas and randomly selects one. Each session gets a single credential, distributing load across subscriptions. A log line indicates which credential index was selected (never the credential itself). Single values (no commas) work unchanged — fully backward compatible.