Variables you set
A flag wins over a variable, and a variable wins over the config file. See
Credential resolution.
Variables you set on a runner
The runner ignoresOUTERLAYER_URL, OUTERLAYER_API_KEY and
OUTERLAYER_APP_ID. It reads its factory and its key only from its config
file. The runner image is the exception: see
In the runner image.
A runner service reads its variables from the files beside its config file,
only when it starts: the credential file of each listed agent (claude.env,
opencode.env, codex.env) and runner.env. See What the service
sets.
A runner offers a listed agent only while it holds a credential that the
agent takes. With no credential for any listed agent, the runner claims no
work.
With built-in hooks, no build receives the agent’s credential. The runner
keeps it and adds it to the requests the build sends to the agent’s model
provider. With hooks of
your own, a build inherits the runner’s environment and can read the
credential. See The gateway and Claude.
In the runner image
Set these in the container’s environment. The guide is Run the runner in a container.
The image writes the config file into its volume on the first start. On a
later start, it refuses a gateway, factory, key or runner name that differs
from that file.
Variables your shell or CI system sets
Variables outerlayer claude sets
outerlayer claude sets OUTERLAYER_CONTROL_PLANE_DIR for the Claude Code it
starts in a governed checkout, on your machine or in a build. It holds the
directory with the control plane’s files. You do not set it.
A hook in the control plane reaches its scripts through the variable, as in
${OUTERLAYER_CONTROL_PLANE_DIR:-$CLAUDE_PROJECT_DIR}/.claude/…. See Share
instructions across repositories.
Variables a build receives
outerlayer runner sets these for the hooks and the command, and so for
everything they start. The runner drops any OUTERLAYER_* variable from the
shell that started it.
A container or microVM build gets nothing else from the host’s environment,
except the names in runner.build.variables. It also gets each destination’s env.
A hook of your own, and a build it starts on the host, inherit the rest of the
runner’s environment. The runner removes destination secrets from it.
In every hook and the command
In one hook
These apply to hooks of your own. See Write your own hooks.OUTERLAYER_OUTCOME is one of ok, incomplete, failed, timed_out,
idle, lease_lost, interrupted or stopped. It is empty when the
provision hook exited 75.
The cleanup hook sees ok for every command that exited 0, and failed for
any other exit. The report hook can see incomplete in place of ok. See When
the command exits 0.
In a build’s command
The universal image is the build image of every build. See
The build image.
In a proof test
In CI
Set the three credential variables and the CLI needs nologin. Store the API
key as a secret:
outerlayer emit artifact then attaches to the pull request without --pr.
outerlayer work build records the CI run as the item’s source.