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_TOKENManual registration token (sf_mrt_…) the runner exchanges for a short-lived session token at startup. 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.

Managed assignment polling

Managed runners request a 30-second bounded wait for each assignment poll. The API owns the server-side cap through RUNNER_ASSIGNMENT_POLL_MAX_WAIT_SECONDS; there is no separate runner environment variable to keep in sync. The runner derives its HTTP timeout from the requested wait plus a 15-second transport buffer and retries a transport timeout while its control-session heartbeat remains healthy.

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.

For the Shipfox-hosted labels available in Shipfox Cloud, see Runner labels.

Token types

PrefixNameCreated byLifetime
sf_mrt_Manual registration tokenSettings → Runners in the dashboardLong-lived; revocable in the dashboard; value shown once at creation.
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_RUNNER_ENABLE_RENEWABLE_GITfalse in source-run mode; true in verified managed imagesEnables automatic renewal for persist-credentials: true Git checkouts. Managed images set this only after verifying the helper and production dependency closure. Do not set it on a self-hosted or unverified image, or add it to provider-rendered runner environment data.
SHIPFOX_RUNNER_ENABLE_RENEWABLE_INFERENCEfalse in source-run mode; true in verified managed imagesEnables renewable credentials for managed Pi and Claude inference sessions. Managed images set this only after verifying the helper and production dependency closure, and only after every API instance accepts renewable_inference in runner capability reports. Do not set it on a self-hosted or unverified image, or add it to provider-rendered runner environment data.
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.

Renewable Git credentials

Verified managed runner images advertise renewable Git credentials after their installation checks pass. A checkout with persist-credentials: true can then renew its exact repository credential during a long job without workflow-supplied tokens or retry logic.

Only a verified managed image may advertise this capability. Do not set the flag on a self-hosted or unverified image. The helper and production-closure checks must pass before a runner enables it.

Older self-hosted runners remain compatible and continue with static checkout credentials. If a persisted checkout is dispatched to one, the job shows a warning that the credential may expire and recommends upgrading the runner image. Scheduling is not blocked by the missing capability.

Git commands started inside a container from a user step do not inherit the host runner's helper or Unix socket. Supply an explicit credential to that container when it needs authenticated Git access. Mounting the job workspace alone does not change this boundary.

Renewable inference credentials

Verified managed runner images advertise renewable inference credentials for Pi and Claude sessions. The runner refreshes a managed credential when the harness needs it while the job attempt remains active.

Only a verified managed image may advertise this capability. Before using the image, deploy an API release that accepts renewable_inference in runner capability reports on every API instance. Older or unverified runners keep the flag disabled and use static credentials until they are replaced.

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