Shipfox
Reference

Runner Configuration Reference

Every Shipfox runner environment variable with its default: registration, labels, polling, heartbeats, log delivery, and agent harness overrides. Plus token types.

This page is the canonical reference for configuring a Shipfox runner process. For the execution model, see Runners and execution environments. To start one, see Start and register a runner.

Required variables

VariablePurpose
SHIPFOX_API_URLBase URL of the Shipfox API the runner connects to, such as https://api.shipfox.io.
SHIPFOX_RUNNER_REGISTRATION_TOKENRegistration token the runner exchanges for a short-lived session token at startup. Accepts sf_mrt_… (manual) or sf_ert_… (ephemeral) tokens; see Token types. Set this or SHIPFOX_RUNNER_BOOTSTRAP_TOKEN, but not both.
SHIPFOX_RUNNER_BOOTSTRAP_TOKENOne-use provisioner-managed bootstrap token (sf_rbt_…); see Token types. The runner exchanges it for a workspace-neutral control session before waiting for an assignment. Set this or SHIPFOX_RUNNER_REGISTRATION_TOKEN, but not both.
SHIPFOX_RUNNER_LABELSComma-separated labels this runner registers with, such as linux,x64,self-hosted.

Label matching

A job is dispatched to a runner only when the runner's labels include all labels the job's runner: field requires. A runner may carry several labels; one machine may run several runner processes with different label sets.

Token types

PrefixNameCreated byLifetime
sf_mrt_Manual registration tokenSettings → Runners in the dashboardLong-lived; revocable in the dashboard; value shown once at creation.
sf_ert_Ephemeral registration tokenA runner provisionerSingle-use; minted per provisioned runner; expires if unused.
sf_rbt_Bootstrap tokenA runner provisionerSingle-use; grants only enrollment into a workspace-neutral control session, not a workspace, reservation, or job credential.

Optional variables

VariableDefaultPurpose
SHIPFOX_RUNNER_WORKSPACE_ROOTOS temp directoryParent directory for per-job workspaces. The runner only creates and cleans per-job child directories under this root.
SHIPFOX_POLL_INTERVAL_MS1000How often the runner asks the API for new jobs. Backs off toward SHIPFOX_POLL_MAX_INTERVAL_MS while idle or after errors.
SHIPFOX_POLL_MAX_INTERVAL_MS5000Largest interval the poll backoff can reach.
SHIPFOX_POLL_MAX_DURATION_MS300000How long the runner keeps polling without claiming a job before it exits. Use 0 for runners that should poll forever.
SHIPFOX_HEARTBEAT_INTERVAL_MS10000How often the runner sends a heartbeat. Keep it well below the server's stuck-job threshold of 180 seconds.
SHIPFOX_HEARTBEAT_MAX_STALE_MS10000How long one heartbeat request may stay open before the runner cancels it and starts the next.

Log delivery

VariableDefaultPurpose
SHIPFOX_LOG_FLUSH_INTERVAL_MS2000How often buffered step logs upload. Bounds how much recent output is lost if the machine dies mid-step.
SHIPFOX_LOG_FLUSH_BYTES262144Size threshold that triggers an early upload before the interval elapses.
SHIPFOX_LOG_SPOOL_MAX_BYTES67108864Maximum unacknowledged log bytes kept on disk per step attempt while the API is unreachable. Past it, output is dropped with a gap marker.
SHIPFOX_LOG_DRAIN_TIMEOUT_MS5000How long the runner waits at job end for in-flight uploads before deleting the workspace.
SHIPFOX_AGENT_SESSION_FLUSH_BYTES4194304Upload window and per-entry drop threshold for agent-session logs. An entry above it is dropped with a gap marker.

Agent steps

Model provider credentials are workspace configuration, delivered to the runner per step by the API. Do not put provider API keys in the runner's environment. The runner machine needs outbound network access to the resolved provider's endpoint. See Model Providers.

VariableDefaultPurpose
AGENT_CLAUDE_ANTHROPIC_BASE_URLunsetAnthropic-compatible base URL override for the claude harness, for tests or private deployments (for example a local Ollama server). Unset uses the Anthropic API.
AGENT_CLAUDE_ANTHROPIC_MODELunsetModel ID the claude harness sends when the base URL override is set.
AGENT_CLAUDE_ANTHROPIC_SMALL_FAST_MODELunsetSmall fast model ID for the claude harness when the base URL override is set.
AGENT_CUSTOM_PROVIDER_ALLOW_PRIVATE_NETWORKStrueAllows custom model providers to target private, loopback, and internal networks. Keep true for local and self-hosted private networks; set false on cloud instances.
AGENT_CUSTOM_PROVIDER_HOST_DENYLISTemptyComma-separated hosts and IP ranges custom model providers may not call. Accepts exact hosts, suffix patterns, IP literals, and CIDR blocks.
Was this page helpful?
Edit this page on GitHub

On this page