Configuration
config.yaml from top to bottom: sandboxes, networks, skills, caches, model roles, MCP, then workspace.yaml and .caffeine.conf.
The home folder
Everything that belongs to you lives in one folder: $CAFFEINE_HOME, or ~/.caffeine by default. A relative CAFFEINE_HOME is resolved against the folder caffeine starts in, and ~ is expanded.
~/.caffeine/
config.yaml global settings: model roles, MCP servers, guard, parallelism
workspace.yaml targets: where pipelines run
pipelines/*.yaml one file per pipeline (see pipelines.md)
prompts/ prompt files; prompts/rules.md is the default rules file
checks/ your check scripts, referenced as {{pack}}/checks/... ({{pack}} is your home for your own pipelines)
packs/ installed packs (see packs.md)
state.json last successful run per target and pipeline
runs/ logs and artifacts of every run (see runs.md)
app/ temporary clones and cache copies, deleted after each run
cache/ pipeline caches (see pipelines.md)
work/ work sessions (caffeine open / close)The binary contains no personal data, so you can share it as is.
The settings are split in two files, so that how caffeine runs and where it runs can change independently. Both are optional, and both accept the .yml extension too.
| File | Holds |
|---|---|
config.yaml | Global settings: model roles, MCP servers, guard, parallelism, Claude binary. |
workspace.yaml | Targets: the repos and folders your pipelines run on. |
A targets: key in config.yaml is refused, with a message pointing to workspace.yaml.
config.yaml
Every key is optional. Unknown keys are refused, so a typo shows up as an error instead of being ignored.
A complete file, every section filled in. Each one is detailed below or on the page it links to.
max_parallel: 2 # targets running at the same time
since_days: 30 # {{last_run}} when a pipeline never succeeded on a target
claude_bin: claude # path or name of the Claude Code CLI
# Model roles: pipelines name a role, never a provider (see "Model roles")
models:
default: { runner: claude }
cheap: { runner: claude, model: haiku }
smart: { runner: claude, model: opus }
local: { runner: llm, base_url: "http://localhost:11434/v1", model: "qwen3" }
# MCP servers, referenced by name with `mcp: [docs]` (see "MCP servers")
mcp:
docs:
type: http
url: ${DOCS_MCP_URL}
headers: { Authorization: "Bearer ${DOCS_MCP_TOKEN}" }
# Skills: where `skills:` names come from (see "Skills")
skills:
max_kb: 64
# Caches kept between runs by the pipelines' `cache:` entries (see "Caches")
cache:
store: local # or s3, with an `s3:` block
max_gb: 20
max_age_days: 30
memory_store: local # or cache: memory of `memory: true` pipelines on the cache's store
# Sandboxes: where steps run, picked with `sandbox:` (see "Sandboxes")
sandboxes:
rust:
engine: podman # podman | docker | bwrap | kubernetes
image: ghcr.io/me/caffeine-rust:1.85
env: [CLAUDE_CODE_OAUTH_TOKEN]
sandbox_default: none # sandbox of the pipelines that set none
sandbox_required: false # true: refuse any step left on the host
# Networks: host lists for `network:` (see "Networks")
networks:
pypi: [pypi.org, files.pythonhosted.org]
network_allow_full: true # false: refuse `network: full` everywhere
network_on_deny: warn # fail: a refused connection fails the run (kubernetes + hubble)
# Paths no step may change (see Safety)
guard:
forbid: ["**/.env", "**/.env.*", ".github/**", ".gitlab-ci.yml", "**/*.pem", "**/*.key", ".caffeine.conf"]
# Automation (see Automation)
budget: { daily_usd: 10, monthly_usd: 100 }
hooks:
on_failure: 'curl -s -d "caffeine: $CAFFEINE_PIPELINE failed" ntfy.sh/my-topic'
keychain_env: [CLAUDE_CODE_OAUTH_TOKEN]| Key | Default | Meaning |
|---|---|---|
max_parallel | 2 | Targets run at the same time. Agents share your quota and builds share your CPU, so keep it low. |
since_days | 30 | {{last_run}} for a target and pipeline that never succeeded. |
claude_bin | claude | Path or name of the Claude Code CLI. CAFFEINE_CLAUDE_BIN overrides it. |
models | default: {runner: claude} | Model roles. |
mcp | none | MCP servers, by name. |
guard.forbid | see Safety | Replaces the default list of protected paths. |
budget | none | daily_usd and monthly_usd caps. See Automation. |
hooks | none | on_finish and on_failure commands. See Automation. |
keychain_env | [] | Environment variables read from the macOS keychain. See Automation. |
skills | none | Where skills: names come from besides your home and the pipeline's folder, and the size cap. See below. |
memory_store | local | cache: keep the memory of memory: true pipelines on the cache's store, shared by the machines that use it. See Pipelines. |
cache | store: local | Where the pipelines' cache: entries are kept (local or s3), and how big the local one may grow. See below. |
sandboxes | none | Where steps run, by name: a container (podman, docker), bubblewrap (bwrap) or a Kubernetes pod (kubernetes). See below. |
sandbox_default | none | Sandbox of the pipelines that set no sandbox:. none is the host. |
sandbox_required | false | Refuse any step that would run on the host (sandbox: none), for scheduled runs of third-party packs. |
networks | built-in crates, npm, github | Named host lists for network:. An entry replaces a built-in one of the same name. See below. |
network_allow_full | true | false: refuse network: full in any pipeline, packs included, also when it comes by default. |
network_on_deny | warn | fail: a run whose pod tried a refused host fails, even if its steps passed. Needs the refused connections, which only a kubernetes sandbox with hubble shows: elsewhere fail is refused at load. |
Caches
cache:
store: local # ~/.caffeine/cache/
max_gb: 20 # caffeine gc: least recently used entries go until the store fits
max_age_days: 30 # caffeine gc: entries unused for longer goEntries are folders under ~/.caffeine/cache/: pipeline/<pipeline>/<target>/<name>/<key>/, target/<target>/<name>/<key>/ or global/<name>/<key>/, following the entry's share. A dir: entry is the folder itself; a paths: entry holds data.tar.zst and a manifest.json (size, sha256, created). The store notes when each entry was last restored or saved. Without max_gb and max_age_days, entries stay until caffeine cache rm; with them, caffeine gc prunes (see Automation). caffeine doctor checks that the store is writable and says whether its copies share blocks. What a pipeline caches and how it is keyed is set in the pipeline (see Pipelines).
An S3 store
To share caches between machines (a laptop and a CI runner), keep them on any S3-compatible store (AWS, MinIO, R2, Garage):
cache:
store: s3
s3:
bucket: caffeine-cache
endpoint: https://s3.example.com # path-style requests: https://s3.example.com/<bucket>/...
region: eu-west-1 # default us-east-1
access_key_env: CAFFEINE_S3_KEY # names of environment variables, never the values
secret_key_env: CAFFEINE_S3_SECRETEach entry is one object, <namespace>/<key>.tar.zst, uploaded and downloaded whole: an upload replaces the object at once, so a reader never gets half of one. A store that cannot be reached, or credentials that are missing or refused, only give a warning: the run goes on without the cache. caffeine doctor checks the bucket with a signed HEAD. caffeine gc never prunes an S3 store: use the bucket's lifecycle rules, or caffeine cache rm. Encryption at rest is up to the store.
cache is only read from this file: a project's .caffeine.conf that sets it is refused, since it would choose what the next run restores and then executes.
Sandboxes
By default every step runs on the host, as you: a run: script, a verify:, a cmd agent or the Claude Code CLI can read ~/.ssh and reach any host. A sandbox runs them somewhere else. Sandboxes are declared here, by name, and pipelines and steps pick one with sandbox: (see Pipelines):
sandboxes:
rust:
engine: podman # podman | docker | bwrap | kubernetes
image: ghcr.io/me/caffeine-rust:1.85
mounts: # extra mounts, read-only unless :rw
- ~/.cargo/registry:/home/me/.cargo/registry:rw
env: [CLAUDE_CODE_OAUTH_TOKEN] # host variables passed in, by name only
cpus: 4
memory: 8g
light:
engine: bwrap # Linux, no image, no daemon
cluster:
engine: kubernetes # one pod per run, through kubectl
image: ghcr.io/me/caffeine-rust:1.85
context: prod-ci # default: kubectl's current context
namespace: caffeine # default: the context's
env: [CLAUDE_CODE_OAUTH_TOKEN] # into a Secret of the run
cni: cilium # the cluster filters by host name: host lists work
hubble: hubble # read the refused connections (network_on_deny)| Key | Default | Meaning |
|---|---|---|
engine | required | podman, docker, bwrap or kubernetes. |
bin | the engine's name | Path or name of the engine's binary (kubectl for kubernetes). |
image | required for podman, docker, kubernetes | The image the steps run in. caffeine never builds one. |
mounts | [] | host:sandbox[:ro|rw], besides what caffeine mounts itself. Read-only unless :rw. Not for kubernetes: a pod does not see your disk. |
env | [] | Names of host environment variables passed in. Never values. |
cpus, memory | none | podman, docker: limits. kubernetes: the pod's limits, in Kubernetes units (memory: 8Gi). |
context, namespace | kubectl's | kubernetes: where the run's pods go. |
cni | none | kubernetes: cilium when the cluster runs Cilium, so a host list becomes a CiliumNetworkPolicy. Without it, host lists are refused. |
hubble | none | kubernetes with cni: cilium and a namespace: path or name of the hubble CLI (it reads HUBBLE_SERVER and friends from your environment), to read the connections the policy refused. |
pr_env | [GH_TOKEN] | kubernetes: names of host variables that only the pipeline's last step, caffeine pr, receives, never the pod's environment nor its Secret (see Pull requests from a pod). Not in env too. |
What a sandbox sees
caffeine mounts what the run needs at the same path as on the host, so every path it renders ({{pack}}, CAFFEINE_WORKDIR, CAFFEINE_LOGDIR, {{skill.NAME}}, {{cache.NAME}}) stays valid:
- the workspace and the run's log folder, read-write, except the workspace's
.git, read-only: a step can read the repo (git status,git diff,git log) but not commit, stash or change its config or hooks, which caffeine's owngiton the host would run (onpodman,dockerandbwrap; a.gitthat a step creates in a folder run in place fails the run); - the pipeline's files, read-only: a pack's folder, or for a pipeline in your home only its
pipelines/,prompts/,checks/,steps/andskills/; - each skill a step loads, read-only;
- the copies of the pipeline's
cache:dir:entries, read-write; - the
caffeinebinary, read-only and first onPATH, socaffeine scope,changedandcheckkeep working inside. Mount a static build (CI buildsx86_64-unknown-linux-musl) when the image's libc differs from the host's.
A claude step's stdio MCP servers are started by the CLI, so inside: their command must be in the image (caffeine doctor warns). Nothing else from ~ or ~/.caffeine: no config.yaml, no state.json, no other runs, no ~/.ssh, no ~/.claude. CAFFEINE_HOME still names your home, which is not there: caffeine pr, caffeine gate and caffeine check actions need it (and your credentials), so they refuse to run in a sandbox; give their step sandbox: none (on kubernetes, caffeine pr runs in the pod as the last step: see Pull requests from a pod). Steps get CAFFEINE_SANDBOX, the sandbox's name. A scratch target (neither git nor dir) that runs sandboxed lives under ~/.caffeine/app/, which the podman machine of macOS shares, instead of the system's temporary folder. The guard, the snapshot, changes.diff, the memory, the caches and the llm runner stay on the host.
podman and docker
One container per run, target and sandbox, caffeine-<target>-<pipeline>-<stamp>-<sandbox>-<pid>, started with run -d --rm --init … sleep infinity from the image (pulled on first use) and removed at the end of the target, after a failure or Ctrl-C too. Each step is an exec in it, so what a step installs stays for the next one, and parallel branches share it. It runs as you (--userns=keep-id on podman, --user <uid>:<gid> on docker), so files it creates in the workspace are yours. SELinux labels are not applied to it (--security-opt label=disable): the host folders are mounted as they are, never relabelled. The environment of a step goes in by name (--env NAME), never as values on the command line. A folder whose path has a : cannot be given to -v, so such a run is refused (bwrap has no such limit). A timeout or Ctrl-C kills the step's process tree inside the container. A second Ctrl-C or a crash leaves the container: caffeine gc removes the ones this install made (label caffeine/install, from ~/.caffeine/install-id, so not another machine's on a shared daemon) whose caffeine process is gone.
Inside, HOME is whatever the image says for your user (often /): an image for claude steps should set a writable one (ENV HOME=/tmp).
bwrap
bubblewrap, on Linux only: no image, no daemon, one bwrap per process. The host's system (/usr, /etc, /bin, /lib…) is there read-only, and with network, the file /etc/resolv.conf points to (under /run with systemd-resolved), $HOME and /tmp are private and empty, and the folders above are mounted at their own paths. The process sees only the step's environment and the variables listed in env:. It runs in its own PID namespace, so a timeout or Ctrl-C ends everything it started. It keeps an agent away from ~/.ssh and your keychain without a container engine; tools installed under your home (~/.cargo, ~/.local/bin) are not there unless a mounts: entry brings them in; when a claude step runs there, caffeine doctor checks that the Claude Code CLI is in the sandbox and, for the subscription, that CLAUDE_CODE_OAUTH_TOKEN is in env: (~/.claude is not there). Elsewhere than Linux, a bwrap sandbox is refused.
kubernetes
One pod = one run. caffeine checks the workspace after each step (guard, snapshot, changes.diff), so instead of syncing it in and out around every step, the whole run moves into one pod per run and target:
- On your machine, caffeine clones a git target (with your credentials: the pod's network is the steps', not caffeine's), then creates, through
kubectl apply, the pod from the sandbox's image (runningsleep infinity, with no service account token) and a Secret with the variables ofenv:, the API keys of the steps' roles and, when aclaudestep runs,ANTHROPIC_BASE_URLif set here, so the CLI in the pod uses the host its network policy allows (values go onkubectl's stdin, never in its arguments). - It copies into the pod, over
kubectl exec … tar, thecaffeinebinary it is running (a static build fits any image) and a run spec: yourconfig.yamlwithout what only your machine uses (hooks, budget, keychain, cache store, other sandboxes), the target, the pipeline's files (your home'spipelines/,prompts/,checks/,steps/,skills/, or its pack), the target's memory, the clone and{{last_run}}. - It runs
caffeine run <pipeline> <target> --in-sandbox /caffeinein the pod and shows its output as it comes: clone, steps, guard, verify, snapshot,changes.diffhappen there, as on a host. - It copies the run's log folder back into
~/.caffeine/runs/…(plain files and folders only, never a link) and takes itssummary.jsonas the run's result. The memory moves forward from that copy, with the usual rule: only after a successful run that is not a dry run. - It deletes the pod, its Secret and its network policy, one by one and the policy last (so a kind the cluster refuses, such as a missing Cilium CRD, does not keep the others): after a success, a failure or Ctrl-C (which skips step 4). A second Ctrl-C or a crash leaves them:
caffeine gcdeletes those that a caffeine process of this install left (labelcaffeine/install, a random id made once in~/.caffeine/install-id, so another machine with the same hostname is never mistaken for this one) and that is gone.
caffeine copies its own binary into the pod, so the kubernetes engine runs from Linux only (refused elsewhere, by the run and caffeine doctor), and that binary must run on the image: a static musl build (x86_64-unknown-linux-musl, or the image's architecture) runs on any; a glibc build needs a glibc as recent in the image. The image needs sh, sleep and tar, and what the steps run (git, your toolchain, claude for agent steps, with a writable HOME). Every step of such a pipeline, apply: included, uses the same kubernetes sandbox: a step with another sandbox, or none, is refused when the pipeline loads. The gates and check actions refuse to run in a sandbox, so they cannot be part of a kubernetes run; caffeine pr can, as below. Refused when the run starts: a folder target (the pod cannot see your disk; use a target with git:), caffeine approve, and skills that come from wska. The cache: entries of such a pipeline are not kept between runs (the store is your machine's). caffeine doctor checks that the context answers and that you may create pods, pods/exec, Secrets and network policies there, and with cni: cilium that the cluster has the CiliumNetworkPolicy API; it cannot look into the image, which the cluster pulls.
Pull requests from a pod
caffeine pr runs in the pod, but its GitHub token never goes into the pod's environment, its Secret, an argument or a file: only that command gets it, in its own environment. So:
- On a kubernetes sandbox,
caffeine pr(arun:that calls it) must be the pipeline's last step, once: not in aloop, aparallelblock or aforeach. Itsrun:iscaffeine prand its flags alone (caffeine pr --auto-merge --title "…"), with no other command,$, redirection or{{template}}, and the step has noverify:: every command of that step would get the token. Anything else is refused when the pipeline loads. - The host variables it gets are the sandbox's
pr_env(defaultGH_TOKEN), by name. AddGH_ENTERPRISE_TOKENandGH_HOSTfor GitHub Enterprise. A name cannot be inenvtoo, nor be a role's API key (both go to every step). When none of them is set on your machine, the run is refused before the pod is made (not in a dry run, which pushes nothing). - When every earlier step is over, the pod's caffeine kills every process they left behind, copies its own binary into a new private folder and gives that step a
PATHof this folder then the image's ownPATH, without the pod's/caffeine/bin(the earlier steps could write there, agitorghas well ascaffeine), and asks your machine for the values on thekubectl execstream, with a one-time word your machine gave it on stdin before the first step (so no step output can ask in its place). Your machine sends them once, on that stdin; they go into the environment of that step alone, that iscaffeine pr. gitandghthen run with the clone's hooks and fsmonitor off and its credential helpers replaced by gh's (gh auth git-credential), so the push uses the same token;git addandgit commitdo not get it. The target'sgit:must be anhttps://URL (no SSH key in the pod), and the image needsgit2.31 or later andgh. The pod's network must reach GitHub (full, or thegithublist on Cilium), for the whole run since a pod has one network.
What this does not cover is in Safety.
Refusals
An unknown sandbox name, an unknown engine or an engine binary that is not there fails caffeine doctor and the run, before anything starts: never a silent fallback to the host. sandboxes, sandbox_default and sandbox_required are only read from this file: a project's .caffeine.conf that sets them is refused, so a cloned repo cannot switch itself to none. A pack's pipeline only names a sandbox; its definition is yours.
Networks
network: on a pipeline or a step limits what a sandboxed step can reach: none, a list of names, or full (the default). The names are declared here, besides the built-in crates, npm and github lists:
networks:
pypi: [pypi.org, files.pythonhosted.org]
corp: [proxy.corp.example.com, "*.internal.example.com"] # a "*." name is a pattern
network_allow_full: false # refuse `network: full`, the default included, in any pipeline
network_on_deny: fail # a run whose pod tried a refused host fails| Key | Default | Meaning |
|---|---|---|
networks | built-in crates, npm, github | Named host lists. An entry replaces a built-in one of the same name. |
network_allow_full | true | false: every step must say none or a list, packs included. |
network_on_deny | warn | fail: a refused connection fails the run. Only a kubernetes sandbox with hubble sees refused connections, so fail is refused at load elsewhere. |
Host lists need an engine that filters by name: kubernetes with cni: cilium. On podman, docker and bwrap, only none and full work. A target's network_default (in workspace.yaml) applies to its pipelines, and a project's .caffeine.conf can only narrow the network. The full rules, per engine, are in Pipelines.
Skills
Steps load skills by name (see Pipelines). Names are found in the pipeline's folder, then in ~/.caffeine/skills/, then in an external resolver if you set one:
skills:
resolver: wska # off by default
wska_bin: wska # optional: path or name of wska ($CAFFEINE_WSKA_BIN overrides it)
max_kb: 64 # most text one step's skills may inject
timeout: 120 # seconds wska resolve may take| Key | Default | Meaning |
|---|---|---|
resolver | none | wska is the only resolver for now. With it, names not found locally and profiles: are resolved by wska resolve, which links nothing and runs no installer. |
wska_bin | wska | Path or name of the wska binary. CAFFEINE_WSKA_BIN overrides it. caffeine doctor checks it. |
max_kb | 64 | A step whose skills inject more fails to load, instead of silently filling the context. |
timeout | 120 | Seconds wska resolve may take (fetching an external the first time can be slow). Past it, wska is killed with everything it started and the pipeline does not load. |
The resolver is read from config.yaml only: a project's .caffeine.conf cannot set it.
Model roles
A pipeline never names a provider. Each step names a role, and the config maps the role to a runner and a model. Changing provider, or trying a cheaper model, is one edit here and no edit in any pipeline.
models:
default: { runner: claude } # used when a step has no `model:`
cheap: { runner: claude, model: haiku }
smart: { runner: claude, model: opus }
credits: { runner: claude, model: sonnet, auth: api_key } # billed to the plan's API credits
local: { runner: llm, base_url: "http://localhost:11434/v1", model: "qwen3" }
api: { runner: llm, base_url: "https://api.openai.com/v1", model: "gpt-5-mini", api_key_env: OPENAI_API_KEY }
codex: { runner: cmd, command: "codex exec --full-auto - < {{prompt_file}}" }| Field | Runner | Meaning |
|---|---|---|
runner | all | claude (default), llm or cmd. See Runners. |
model | claude, llm | Model name passed to the runner. For claude, without it the CLI's default model is used. |
base_url | llm | OpenAI-compatible base URL. caffeine calls {base_url}/chat/completions. |
auth | claude | subscription (default): the CLI uses your Claude login. api_key: it uses a Console API key, billed to that organization (see API credits). |
api_key_env | llm, claude | Name of the environment variable that holds the API key. llm: sent as Authorization: Bearer. claude with auth: api_key: passed as ANTHROPIC_API_KEY (the default variable). The key itself never goes in a file. |
command | cmd | Shell command run in the workspace. {{prompt_file}} is the path of the rendered prompt. |
network | cmd | Host lists the CLI needs (its model API), added to the step's network when it is none or a list (so none becomes those hosts), not full. See Pipelines. |
If no default role is declared, default is { runner: claude }.
MCP servers
MCP servers are declared once and referenced by name in pipelines (mcp: [docs]). The agent can only call a server's tools if the step's allowed_tools lists them (for example mcp__docs__*).
mcp:
docs:
type: http
url: ${DOCS_MCP_URL}
headers:
Authorization: "Bearer ${DOCS_MCP_TOKEN}"
files:
type: stdio
command: npx
args: ["-y", "@modelcontextprotocol/server-filesystem", "/srv/shared"]${VAR} is replaced by the environment variable, anywhere in the server definition. An http server whose url ends up empty (variable not set) is skipped, not an error: the pipeline runs without it.
Only the servers a pipeline lists are given to the agent. Servers from your global Claude Code config are never loaded (--strict-mcp-config).
Targets: workspace.yaml
A target is a place where pipelines run. Targets live in workspace.yaml, the only key of that file.
# ~/.caffeine/workspace.yaml
targets:
- name: my-site
git: [email protected]:me/my-site.git # cloned fresh for each run, then deleted
pipelines: [deps, content-watch]
context:
product_desc: "my personal site, built with Actix-web"
- name: notes
dir: ~/Documents/notes # changed in place
pipelines: [weekly-digest]
- name: tickets
pipelines: [triage] # neither git nor dir: a scratch folder, for MCP-only work| Field | Meaning |
|---|---|
name | Used on the command line, in logs and in state.json. Must be unique. |
git | A git URL. Each run clones it (--depth 50) into ~/.caffeine/app/, works on a branch, and deletes the clone. |
dir | A local folder. The run works in place. |
| (neither) | A temporary folder, deleted after the run. |
pipelines | Pipelines that caffeine run <pipeline> --all runs on this target. |
context | Variables for prompts and commands: {{product_desc}}. |
trust_project_conf | Read .caffeine.conf from the clone of a git target. Off by default. |
network_default | network: of the pipelines that set none, on this target: none, a list of names, or full (the default). See Pipelines. |
workspace.yaml can also hold schedules:, the runs caffeine starts on its own. See Automation.
Without a target on the command line, caffeine run <pipeline> runs in the current folder, in place. If that folder is a declared target (its dir:, or a checkout whose git remote points to a target's git: repo, in any spelling), the run takes that target's name, context and history. Otherwise it is an anonymous folder named after the folder. See Command reference.
Per-project overrides: .caffeine.conf
A project can lay a .caffeine.conf (YAML) over your config. It overlays the config, it does not replace it:
modelsandmcpmerge key by key. A project entry replaces the global entry with the same name as a whole: a role is never half global, half local.contextadds variables, and wins over the target'scontextfromworkspace.yaml.since_daysreplaces the global value.networknarrows every step's network:none, or a list within what each step asks for. One that would widen a step's network (a list where the step hasnone,fullwhere it has a list) fails the run. The hosts each runner adds come from the roles of yourconfig.yaml: a role the project file redefines (its runner,network:orbase_url) adds none, nor does an MCP server it redefines (itsurl), so a role or server that needs another host than yours is refused by the policy. See Pipelines.- Nothing else is allowed.
targets,guard,cache,sandboxes,networksandclaude_binstay global, so a project cannot widen its own permissions.
# my-project/.caffeine.conf
models:
cheap: { runner: llm, base_url: "http://localhost:11434/v1", model: "qwen3" } # this project uses a local model
context:
product_desc: "internal billing API"Which projects are read:
| Target | .caffeine.conf read |
|---|---|
Current folder (caffeine run p) | yes |
dir: target | yes |
git: target | only with trust_project_conf: true |
A cloned repo is not trusted by default. Its .caffeine.conf could otherwise point an llm role at its own server with api_key_env set to one of your tokens. When the file is there but ignored, the run says so.
When you run in the current folder, the roles declared in its .caffeine.conf can also be used by the pipeline's steps. For git targets, the roles a pipeline uses must exist in config.yaml. A trusted project file can then only remap them.
The guard protects .caffeine.conf itself: no step may create or change it.