-
Notifications
You must be signed in to change notification settings - Fork 0
config precedence
github-actions[bot] edited this page Aug 12, 2026
·
3 revisions
When a setting could come from more than one place, Forge Fleet resolves it in a
fixed order. Understanding this explains two things that surprise people: why a
flag sometimes "wins" over your config, and why some settings only take effect
after a remove.
-
CLI flag — e.g.
--image,--git-mode,-p. Explicit on the command line; applies to this run. -
Environment variable / dotenv — e.g.
IMAGE_NAME,GIT_MODE, or an entry in.env.forge-fleet/.forge-fleet/.env. See the env-var mapping. -
ffleet.toml— the project's configured value. -
Built-in default — what ffleet uses when none of the above is set
(e.g.
image = forge-fleet:latest,git_mode = auto,wait-timeout = 300).
So a flag overrides an env var / dotenv entry, which overrides the config file, which overrides the default. Nothing exotic — the twist is when the resolved value gets applied.
An environment's settings split into two groups, and ffleet up treats them
differently on a revive/rebuild (this is stated in ffleet up --help):
-
Config-derived (refreshed every
up) —image,extra_mounts,extra_hosts,docker_env_file, credentialauth, credential dirs (~/.claude/~/.codex), agentcmd/extra_args. These are re-read from your current config/flags each time and saved back. Change one, thenffleet stop SLUG+ffleet up SLUGto apply it. -
Identity/continuity (fixed at create) — branch, worktree, in-place vs
worktree mode,
git-mode, which coding agent, and the session. These are pinned when the environment is first created and do not change on revive, because changing them would mean a different environment. To change one you mustffleet remove SLUGand recreate.
flowchart TD
F[CLI flag] --> R{resolve}
E[env var / dotenv] --> R
T[ffleet.toml] --> R
D[built-in default] --> R
R --> V[effective value for this run]
V --> K{which kind of setting?}
K -->|config-derived| RE[applied now; refreshed on every up]
K -->|identity/continuity| FX[fixed at create; needs remove to change]
- Passed a flag and it did what you expected → good, flags are top of the order.
- Changed
image/mounts/env-file and want it live →stopthenup. - Need a different branch, git-mode, or agent →
removeand start fresh; there's no in-place way to change identity. - Not sure which bucket a setting is in → check the table in how-to/working.md.