Skip to main content
~/.outerlayer/config.json holds your sign-in, your sync settings and, on a runner host, the runner block. outerlayer login creates the file, readable only by your account. Every write by the CLI merges into the file, so a key you add by hand stays. To remove a key, edit the file. If the file is not valid JSON, every command that signs in stops and names the file. No command writes over it. Fix the file or move it aside, then run the command again. The example shows the keys that most files hold:

Sign-in and sync

Environment variables override url, apiKey, appId and tier. See Environment variables. The runner ignores those variables and reads only its own config file.

Repository filter and scrubbing

The rules for repos:
  • A pattern matches the remote with its host, such as github.com/acme/app. * matches anything, and matching ignores case.
  • exclude wins over include.
  • With include set, a session with no remote does not sync.
  • A Linear or Jira item matches by the repository it was added with (work build --repo). An item added without a repository matches no pattern.
  • A session that the filter skips is not tried again. After you loosen the filter, run sync --all to send it.
The rules for scrub:
  • A literal needs at least 3 characters, not counting spaces at either end. It matches in any case.
  • A pattern matches in the case you write it. An invalid pattern is skipped with a warning.
  • A label shows in the redaction marker as [REDACTED:<label>]. It has 1 to 32 letters, digits or hyphens. Any other label becomes custom.
  • Your scrubbers never replace the built-in secret patterns.

Runner

The runner block sets up outerlayer runner. outerlayer runner init writes it. The runner needs url, apiKey and appId from a runner key, never from a person’s login. See Give the runner its key. Every outerlayer runner command takes --config <path> to use another file. On your own account, give the runner a file of its own, such as ~/.outerlayer-runner/config.json. Then the runner key does not replace your login. The runner refuses a key that it does not know, in the runner block and in each block inside it. When the key is close to a known key, the error adds did you mean <key>?.

Identity and queues

Polling and time limits

Commands and hooks

The rules for a hook:
  • The built-in hooks are builtin:container (What a build gets), builtin:vm (MicroVM builds) and builtin:sandbox (Sandbox builds).
  • An executable is an absolute path with no arguments. Nothing expands $HOME or ~.
  • The runner refuses builtin:process.
See Write your own hooks for what each hook receives and must do.

Build limits and hosts

A size is a number with an optional k, m or g, such as 8g, 1.5g or 512m. The provision hook of your own gets memory, cpus, pids and disk as OUTERLAYER_MEMORY, OUTERLAYER_CPUS, OUTERLAYER_PIDS and OUTERLAYER_DISK. The rules for runner.build.variables:
  • The runner refuses a name that it sets itself, such as PATH, ANTHROPIC_BASE_URL or a name that starts OUTERLAYER_.
  • The runner skips GH_TOKEN, GITHUB_TOKEN, GH_ENTERPRISE_TOKEN and GITHUB_ENTERPRISE_TOKEN, and logs that.
  • For CLAUDE_CODE_OAUTH_TOKEN and ANTHROPIC_API_KEY, the build gets a placeholder, never the value.
  • A name cannot also be in a destination’s header or env.
The keys of runner.build.egress are connectionsPerSecond, connectionBurst, openConnections, sendBytesPerSecond and flagHosts. Each is a whole number. connectionBurst is at least 1. For the other four, 0 means no limit. See Egress limits.

Sandbox builds

With builtin:sandbox hooks, each build runs in a sandbox that OuterLayer provides. The runner.sandbox block is optional with these hooks, and refused with any other.

Sandboxes that OuterLayer provides

The runner needs no sandbox provider account. It asks OuterLayer for the sandbox of each build with its runner key. OuterLayer turns this on for an organization. On Linux, WSL2 and macOS, outerlayer runner init --sandbox writes this block. See Build in a managed sandbox for what a managed sandbox is and what stays on your machine.
  • The size comes from the factory’s Settings → Build settings. Small is 4 vCPU and 16 GiB of memory. Large, with 8 vCPU and 32 GiB, is coming soon. runner.build.cpus, runner.build.memory and runner.build.disk do not size the sandbox. A config that still sets runner.sandbox.machine loads, and outerlayer runner check says that the key has no effect.
  • The sandbox has no direct network access. A build reaches the network through the runner’s tunnel, so runner.build.allowHosts still applies.
  • The agent’s credential and the push token stay on the runner. They never enter the sandbox. The sandbox holds a short-lived GitHub read token, which gh uses in the build.
  • The build’s time is billed as managed build-hours, at the machine size. See Builds in a managed sandbox.
  • The sandbox is kept for the work item’s next job. When a job ends, OuterLayer keeps its sandbox, paused, for 24 hours. The next job of the work item resumes it, so a rerun or an amend does not clone and set up again.
  • A factory has at most 10 kept sandboxes. OuterLayer ends a kept sandbox after 24 hours, or sooner when the factory has more than 10. The next job of that work item then starts in a new sandbox, and its log says why.
  • A paused sandbox is not billed. The time between two jobs of a work item costs nothing.
  • The agent’s session is still kept on the runner and continued.
When OuterLayer makes no sandbox for a build, the build is not failed. This happens when a trial has no hours left, when the spending cap is reached, and when managed sandboxes are off for the organization. The runner gives the item back, takes no work for 5 minutes, and then tries again. When the organization already runs as many managed builds as its plan allows, a build first waits up to 10 minutes for one to end. outerlayer runner check says when OuterLayer provides no sandbox to the runner, and why. A sandbox can be slow to start, for example from a snapshot that was not used for some hours. The runner waits up to 20 minutes for the sandbox, then builds in it. Its log says that it waits. After 20 minutes the runner ends the sandbox, and the build ends in the provision stage with the reason sandbox <id> did not start in 20 minutes. Two more rules apply:
  • Restart the runner after you change the runner.sandbox block. A runner that is running keeps the settings it started with.
  • Schedule runs. A runner on OuterLayer’s sandboxes takes the runs of a schedule automation. OuterLayer makes a sandbox of the size Small for each run. See Runs of schedule automations.

Housekeeping

Each size has the same form as runner.build.memory. See Housekeeping.

Updates and comments

Conditions of a managed runner

OuterLayer operates managed runners. The runner config of your own runner needs no setting for them, and runner check refuses a runner.managed key. A managed runner claims no work until all four conditions hold:
  • The hooks are builtin:sandbox, so each build runs in a sandbox: a microVM of its own at the sandbox provider.
  • The host holds no Claude credential. Neither CLAUDE_CODE_OAUTH_TOKEN nor ANTHROPIC_API_KEY is set in the environment, the service’s credentials directory, runner.env or claude.env.
  • runner.build.allowHosts is set. An empty list counts as set.
  • No key of runner.build.egress is 0.
See Managed runners.

When a change takes effect

The runner reads this file again at each poll when the file has changed. It uses the new settings from that poll on. If the new file is not valid, the runner keeps the last good settings. It logs config re-read rejected: <reason> · keeping the last good config. outerlayer runner check reports the same problem. Three kinds of change need more than a save:
  • After a change to runner.pollSeconds or runner.wait, restart the runner.
  • After a change to runner.sandbox.provider, restart the runner. Until then it keeps the last good settings and logs the rejected re-read.
  • After a change to the hooks, runner.timeLimitMinutes or runner.build.imageBuild, run outerlayer runner install --service again. Do the same for runner.concurrency when the hooks are builtin:vm. See Re-run the service.
A new runner.timeLimitMinutes applies to the builds that start after the change. A build that runs keeps the limit it started with, because its sandbox’s own limit at the provider was set from that value.

Files the CLI keeps in ~/.outerlayer

These files are in ~/.outerlayer in your home folder. The .outerlayer/ folder of a repository is a different folder. See The .outerlayer directory.