User Configuration — Reference¶
amplihack reads persistent defaults from two TOML files: one for you, one for
a project. amplihack config reads and edits them. Every environment variable
and command-line flag that existed before still works and still wins over the
files.
Contents¶
- Quick start
- Files
- Precedence
- Keys
- agent.binary
- agent.overflow_harnesses
- paths.home
- lists.set and lists.enabled
- node.heap_consent and node.max_old_space_mb
- recipe.verbose
- recipe.step_timeout
- recipe.detach, recipe.tmux_session_pattern and recipe.log_dir
- recipe.usage_limit_wait
- orchestrator.max_depth
- model.force
- model.tier_map
- Review keys
- Governor keys
- agent.standing
- sessions.daily_archive
- sessions.archive_days and sessions.archive_dest
- policy.deny_commands
- text.routing and text.prompt_preferences
- The config command
- config get
- config set
- config unset
- config list
- config edit
- config path
- Exit codes
- Validation and diagnostics
- Trust rules
- Migration from ~/.amplihack/config
- When migration runs
- Details
- Where the effective config is reported
- How files are written
- Related
Quick start¶
Choose your agent CLI once, then check what amplihack will use:
amplihack config set agent.binary claude
amplihack config set recipe.verbose true
amplihack config list --show-origin
agent.binary = "claude" # user (/home/alice/.amplihack/config.toml)
paths.home = (unset) # default
lists.set = "default" # default
lists.enabled = [] # default
node.heap_consent = true # user (/home/alice/.amplihack/config.toml)
node.max_old_space_mb = (unset) # default
recipe.verbose = true # user (/home/alice/.amplihack/config.toml)
recipe.step_timeout = (unset) # default
recipe.detach = "none" # default
recipe.tmux_session_pattern = "amp-{recipe}-{repo}-{ts}" # default
recipe.log_dir = (unset) # default
recipe.usage_limit_wait = true # default
policy.deny_commands = (unset) # default
orchestrator.max_depth = 3 # default
model.force = (unset) # default
model.tier_map = (unset) # default
review.combined_small_diff = false # default
review.combined_diff_threshold = 200 # default
governor.enabled = false # default
governor.max_concurrency = 4 # default
governor.reserve_points = 10 # default
governor.step = 1 # default
governor.band_pct = 10 # default
governor.eval_interval_secs = 60 # default
governor.wait_secs = 600 # default
governor.max_reading_age_secs = 3600 # default
sessions.daily_archive = true # default
sessions.archive_days = 3 # default
sessions.archive_dest = (unset) # default
text.routing = "on" # default
text.prompt_preferences = "on" # default
amplihack agent-binary now answers claude (user_config), even inside a tmux
server that some other CLI started.
Files¶
| Layer | Path | Written by |
|---|---|---|
| user | $HOME/.amplihack/config.toml |
amplihack config set, unset, edit |
| project | <dir>/.amplihack/config.toml |
amplihack config set --project, unset --project, edit --project |
| legacy | $HOME/.amplihack/config (JSON) |
Only the migration, which renames it or removes its two node_options_* keys. See Migration. |
HOMEcomes from the environment.AMPLIHACK_HOMEnever moves the user file.- Finding the project file: amplihack first finds the git root: the
nearest directory, from the current directory upward, that holds a
.gitfile (a worktree or submodule) or a.gitdirectory containingHEAD. An empty.gitdirectory does not count, as it does not for git. It then searches from the current directory up to that root, and uses the first.amplihack/config.tomlit finds. - The search never goes above the git root. In a nested repository or a submodule, the outer repository's project file is not read.
- Outside a git repository there is no project layer. A
.amplihack/config.tomlin a directory that is not inside a git repository is ignored, even in the current directory. - When the project file is the same file as the user file (you are in
$HOMEand$HOMEis a git repository), it is read once, as the user layer. - When no project file exists yet,
--projectwrites<git root>/.amplihack/config.toml. - Both files are plain TOML. Keys are grouped into tables:
# ~/.amplihack/config.toml
[agent]
binary = "claude"
[node]
heap_consent = true
[recipe]
verbose = true
step_timeout = 3600
[orchestrator]
max_depth = 4
amplihack config set agent.binary claude and writing [agent] /
binary = "claude" by hand are equivalent.
Precedence¶
For each key, the first layer that sets it wins:
| Rank | Origin label | Source |
|---|---|---|
| 1 | flag |
A command-line flag, for the keys that have one (--verbose, --step-timeout, sessions archive --days, --dest) |
| 2 | env |
The key's environment variable, for the keys that have one |
| 3 | project |
The project file |
| 4 | user |
The user file |
| 5 | legacy |
~/.amplihack/config, only while a migration could not complete |
| 6 | default |
The built-in default, or (unset) when the key has none |
Two keys bend this order so that a cloned repository cannot raise your limits:
the project file can only lower orchestrator.max_depth and
recipe.step_timeout. See Trust rules.
config get --show-origin, config list --show-origin and amplihack doctor
print the labels from rank 2 down. config cannot see the flags of another
command, so it never prints flag.
Keys¶
| Key | Type | Default | Env var | Flag | Files |
|---|---|---|---|---|---|
agent.binary |
claude, copilot, codex or amplifier |
(unset) | AMPLIHACK_AGENT_BINARY |
none | user only |
agent.overflow_harnesses |
list of claude, codex and copilot, each at most once |
(unset: off) | AMPLIHACK_OVERFLOW_HARNESSES |
none | user only |
paths.home |
absolute path to an existing directory | (unset) | AMPLIHACK_HOME |
none | user only |
lists.set |
default or all |
default |
none | none | user only |
lists.enabled |
array of qualified skill and agent identities | [] |
none | none | user only |
node.heap_consent |
bool | (unset) | none | none | user only |
node.max_old_space_mb |
integer, 8192 to 32768 | (unset) | none | none | user only |
recipe.verbose |
bool | false |
none | --verbose |
user, project |
recipe.step_timeout |
integer seconds, at least 1 | (unset) | AMPLIHACK_STEP_TIMEOUT |
--step-timeout |
user, project (lower only) |
recipe.detach |
tmux or none |
none |
none | --detach, --no-detach |
user, project |
recipe.tmux_session_pattern |
session-name pattern | amp-{recipe}-{repo}-{ts} |
none | none | user, project |
recipe.log_dir |
absolute path | (unset: ~/.amplihack/recipe-logs) |
none | none | user only |
recipe.usage_limit_wait |
bool | true |
AMPLIHACK_USAGE_LIMIT_WAIT |
none | user, project |
policy.deny_commands |
list of command prefixes | (unset: the shipped defaults only) | none | none | user only |
orchestrator.max_depth |
integer, 0 to 32 | 3 |
AMPLIHACK_MAX_DEPTH |
none | user, project (lower only) |
model.force |
model id | (unset) | AMPLIHACK_FORCE_MODEL |
none | user only |
model.tier_map |
absolute path | (unset: $AMPLIHACK_HOME/model-tiers.toml, then ~/.amplihack/model-tiers.toml) |
none | none | user only |
review.combined_small_diff |
bool | false |
none | none | user only |
review.combined_diff_threshold |
integer lines, 1 to 100000 | 200 |
none | none | user only |
governor.enabled |
bool | false |
none | none | user only |
governor.max_concurrency |
integer, 1 to 64 | 4 |
none | none | user only |
governor.reserve_points |
integer, 0 to 100 | 10 |
none | none | user only |
governor.step |
integer, 1 to 8 | 1 |
none | none | user only |
governor.band_pct |
integer, 0 to 50 | 10 |
none | none | user only |
governor.eval_interval_secs |
integer seconds, 1 to 3600 | 60 |
none | none | user only |
governor.wait_secs |
integer seconds, 0 to 86400 | 600 |
none | none | user only |
governor.max_reading_age_secs |
integer seconds, 60 to 86400 | 3600 |
none | none | user only |
agent.standing |
bool | false |
none | --standing, --no-standing |
user only |
sessions.daily_archive |
bool | true |
none | none | user only |
sessions.archive_days |
integer days, 1 to 4294967295 | 3 |
none | --days |
user only |
sessions.archive_dest |
absolute path | (unset: ~/.amplihack/session-archive) |
none | --dest |
user only |
text.routing |
on or off |
on |
AMPLIHACK_ROUTING_TEXT |
none | user, project |
text.prompt_preferences |
on or off |
on |
AMPLIHACK_PROMPT_PREFERENCES |
none | user, project |
Any other key is an error for config set and a diagnostic when found in a
file. A user-only key in a project file is reported and ignored.
agent.binary¶
The agent CLI that recipe steps, hooks and sub-agents call back into. A
configured value is an explicit choice of yours, so it is labelled
user_config. It is user-only: a cloned repository must not switch the CLI
your agent steps run under, so a project file's agent.binary is reported and
ignored, and config set agent.binary --project is a usage error. The
resolver order becomes:
| # | Source | Label |
|---|---|---|
| 1 | AMPLIHACK_AGENT_BINARY that you set: untagged, carrying a tag amplihack does not recognise, or carrying a user_config: tag for a different binary |
env |
| 2 | The CLI this process actually runs in: a live session marker such as CLAUDECODE or COPILOT_CLI, or a launcher's session:<cli> tag (what amplihack claude exports) |
session_marker |
| 3 | agent.binary from the user file, else an inherited AMPLIHACK_AGENT_BINARY tagged user_config:<same binary> |
user_config |
| 4 | What a tmux server supplied: a tmux_server:*-tagged value, then a session marker the server's global environment also holds |
env, session_marker |
| 5 | .claude/runtime/launcher_context.json, then the built-in default copilot (a default:* tag is ignored) |
launcher_context, default |
Rank 3 sits below the session you are actually in and above anything a tmux
server handed down. Inside tmux, a session marker counts as rank 2 only when
the server's global environment does not hold it too (or, when amplihack
launched the session, does not hold the same AMPLIHACK_SESSION_NONCE, a
random value each amplihack <cli> launch exports). When the config answers
over a marker of another CLI, recipe run and agent-binary say so on
stderr. A tmux server started from a Copilot session holds COPILOT_CLI=1
and gives it to every pane, so in that server a run with
agent.binary = "claude" configured still uses claude.
Inside amplihack claude, or a Claude Code session, steps run under claude
whatever agent.binary says.
$ amplihack config set agent.binary claude
set agent.binary = "claude" in /home/alice/.amplihack/config.toml
$ amplihack agent-binary # in a pane of a server Copilot started
claude (user_config)
$ COPILOT_CLI=1 amplihack agent-binary # a Copilot session, outside tmux
copilot (session_marker)
$ AMPLIHACK_AGENT_BINARY=codex amplihack agent-binary
codex (env)
When amplihack exports a user_config answer to a child, it tags it:
- The tag uses the same
kind:<binary>form assession:anddefault:, so it binds to its value. If you later setAMPLIHACK_AGENT_BINARY=codexby hand next to a staleuser_config:claudetag, the tag no longer describes the value andcodexis treated as your explicit choice (rank 1). - A bare
user_configtag, with no binary, binds to whatever value is next to it. - This process's own
agent.binarybeats an inheriteduser_config:<binary>value, so aconfig settakes effect even in the panes of a tmux server that captured the old value, andconfig list --show-originshows what runs. With nothing configured, the inherited value answers. - Tags are bookkeeping, not a security control. Every value, tagged or not, is checked against the allowlist before its tag is read.
- A
user_configanswer may be written tolauncher_context.json, unlike adefaultguess.
amplihack agent-binary --shell renders the same tag. It does so even inside a
tmux server whose global environment holds another CLI's session marker. The configured value decided the answer,
not the marker, so the tag is user_config:<binary> and never
tmux_server:<marker>:
$ amplihack agent-binary --shell
env -u CLAUDECODE -u CLAUDE_CODE -u CLAUDE_CODE_SESSION_ID -u CLAUDE_PROJECT_DIR -u CLAUDE_CODE_ENTRYPOINT -u COPILOT_CLI -u GITHUB_COPILOT -u GITHUB_COPILOT_AGENT -u COPILOT_AGENT -u AMPLIHACK_PARENT_RECIPE_PID -u AMPLIHACK_PARENT_RECIPE_STARTTIME -u AMPLIHACK_AUTODRIVE_STATE_DIR -u AMPLIHACK_RUN_GUIDANCE_DIRS AMPLIHACK_AGENT_BINARY=claude AMPLIHACK_AGENT_BINARY_SOURCE=user_config:claude
The full resolver is described in Active Agent Binary.
agent.overflow_harnesses¶
The harnesses a recipe agent step may run on when its own harness cannot run
it, in order. Unset, overflow is off and steps behave as they do without this
key. With a list, a supervised Claude step that meets a usage limit with no
Claude login with room, or whose login Claude rejects, runs again from the
start on the first listed harness that has an overflow adapter, is installed
and is logged in. Codex is the one harness with an adapter; claude and
copilot are accepted names and are skipped as no_adapter.
Harness overflow describes when a
step overflows, how later steps return and what is recorded.
config set takes a comma-separated list, matched without regard to case and
stored in lowercase as a TOML array. off or none sets the empty list. An
unknown name or a name given twice is a usage error.
$ amplihack config set agent.overflow_harnesses codex
$ amplihack config get agent.overflow_harnesses
codex
$ amplihack config unset agent.overflow_harnesses
AMPLIHACK_OVERFLOW_HARNESSES outranks the key. off or none in the
variable turns overflow off for one command while the key stays set.
The key is user-only, for the reason agent.binary is: a cloned repository
must not choose the CLI your agent steps run under. A project file's value is
reported and ignored.
paths.home¶
Where amplihack loads its framework assets, hooks and runtime state from. The resolution order becomes:
AMPLIHACK_HOMEfrom the environmentpaths.homefrom the user file- The bundle root found by walking up from the working directory (a checkout
or worktree with an
amplifier-bundle/directory) $HOME/.amplihack- The executable's directory
config set accepts only an absolute path, without .. components, control
characters or NUL, at most 4096 bytes, naming an existing directory that you
own. If the directory is later removed or changes owner, the value is skipped
with a logged warning and the next step answers.
paths.home is user-only. A project file cannot set it, because the home
decides which hooks run.
lists.set and lists.enabled¶
lists.set chooses which installed skills and agents a tool lists to the model.
default selects the shared set of 30 skills and 12 agents, plus entries in
lists.enabled. all selects each tool's full inventory. The complete
framework and directory index remain available in both modes.
lists.enabled is a TOML array. Use directory commands to change one entry at
a time; config set lists.enabled is not supported:
amplihack directory enable skill:design-patterns-expert
amplihack directory enable agent:core/guide
amplihack config get lists.enabled
Use skill:<leaf-name> for a skill and
agent:<bundle-relative-path-without-extension> for an agent. Writes check
entries against the installed directory index. Unknown entries are rejected
before the configuration changes. Duplicate entries and entries already in
the default set are omitted. An empty array means no extensions.
Both settings are user-only. A project file cannot change them. Extensions
remain recorded in all mode for a later return to default.
Only config set lists.set applies the selection immediately to every tool
already installed for amplihack, including when the value is unchanged.
config unset and config edit change only the configuration; those changes
apply at the next install or update, or with config set lists.set <value>.
Applying a list change requires the installed framework version to match the
binary. Otherwise the command changes no configuration or tool files and
asks for amplihack install. List changes never refresh framework definitions
or install another tool. Start a new tool session to use
the changed lists. If one publication fails, the command exits non-zero and
reports failed and completed applications. The desired configuration remains
saved; repeat the command after correcting the problem to finish publication.
Restore the full lists with one command, without a separate install:
Setting lists.set back to default restores the smaller set plus saved
extensions immediately. Unsetting it selects that set for the next install
or update. Unsetting lists.enabled removes all explicit extensions from
the configuration. Codex's all mode keeps its established analyst exclusions;
explicitly enabled analyst skills are packaged in default mode.
For individual changes, use directory enable and directory disable.
The how-to covers upgrades and
the repository plugin limitation. That plugin always exposes the shared
default set and reads neither list setting.
node.heap_consent and node.max_old_space_mb¶
The launcher asks once whether it may set NODE_OPTIONS=--max-old-space-size=<mb>
for the agent CLIs it starts. Your answer is saved as node.heap_consent in
the user file. The launcher reports the saved choice on every launch:
ℹ NODE_OPTIONS=--max-old-space-size=32768 (saved preference). To change: amplihack config set node.heap_consent <true|false>
node.heap_consent = trueapplies the limit without asking.node.heap_consent = falseskips it without asking.- Unset, the launcher asks, as before.
- The launcher saves your answer without an
fsync, so a crash soon after the first launch can lose it and the launcher asks again.amplihack config set node.heap_consentsaves it durably. See How files are written. node.max_old_space_mboverrides the limit. Unset, the limit is computed from the machine's RAM on every launch, as before. Values outside 8192 to 32768 are rejected.
Both keys are user-only.
recipe.verbose¶
Turns on amplihack recipe run --verbose by default. The flag and the config
value are combined with OR: --verbose always turns it on, and there is no
flag to turn a configured true off for one run. Use
amplihack config unset recipe.verbose instead.
recipe.step_timeout¶
A per-step timeout ceiling, in seconds, for every step of recipe run. The
first of these wins:
--step-timeout <SECONDS>. It is exported to the runner asAMPLIHACK_STEP_TIMEOUT.AMPLIHACK_STEP_TIMEOUTalready in the environment. It is passed on unchanged, and its origin isenv.recipe.step_timeoutfrom the config files. It is exported asAMPLIHACK_STEP_TIMEOUT.
Unset everywhere, the runner's own default applies (agent steps have no
timeout). The config value must be at least 1; to disable timeouts for one
run, pass --step-timeout 0.
A usage-limit wait does not read this value: a step timeout does not cut a wait or stop the retry after it (see The step timeout does not cut a wait).
A project file can only lower this value below the user file's. When the user file does not set it, the project value applies.
recipe.detach¶
recipe.detach = "tmux" makes every amplihack recipe run start detached, as
--detach does: in a new tmux session with a private log. --no-detach runs
one in the foreground anyway. See
Detached runs.
recipe.tmux_session_pattern¶
The name of the tmux session a detached run creates. {recipe} is the
recipe's file stem or name, {repo} the directory name of the git root above
the working directory, and {ts} the UTC time as YYYYMMDD-HHMMSS. The
pattern is 1 to 64 characters of letters, digits, - and _ besides those
placeholders, so a session name never needs quoting.
recipe.log_dir¶
Where detached runs write their logs, as <session>.log. Unset, it is
~/.amplihack/recipe-logs. The directory is created with mode 0700, and an
existing one must be yours; each log is created with mode 0600. User-only,
like every path.
recipe.usage_limit_wait¶
Whether a recipe agent step that fails on a Claude usage limit waits, for
the reset, for another login with capacity, or for the login in ~/.claude
to change, and runs once more, instead of ending the run. See the
usage-limit wait. With no setting
in the environment or a file, it is on. CI does not turn it off
(issue #2911): it used to, but amplihack's delegation layer exports
CI=true to every delegated claude -p, so a recipe run started from one
ended at its first limit. Setting it to false is the one way to let a limit end a step,
and that is intended: the limit result is passed up at once
(skipped reason=disabled) and the run is recorded as resumable with the
cause usage_limit. The environment variable also accepts 1 and 0.
No key sets how long a wait lasts. A wait for a stated reset ends at the reset plus 120 seconds, however far away, or sooner on room or a login change; a wait whose limit stated no usable reset has no deadline and ends when a login has room or the login changes. See A wait has no length setting.
recipe.usage_limit_max_wait_secs has been removed. A file that still sets
it gets recipe.usage_limit_max_wait_secs: unknown key when it loads, and the
rest of the file applies; amplihack config set refuses the key as unknown
(exit code 2). AMPLIHACK_USAGE_LIMIT_MAX_WAIT_SECS is no longer read.
orchestrator.max_depth¶
The session-tree recursion ceiling for a new root session, replacing the
built-in default of 3. AMPLIHACK_MAX_DEPTH still wins over the config.
A tree that is already running keeps its sealed ceiling. Neither the
environment nor the config can raise it: a child session in a tree sealed at 2
stays at 2 even with orchestrator.max_depth = 10 configured. See
Session Tree Recursion Control.
A project file can only lower this value: the result is the smaller of the project value and the user value (or the default, 3).
model.force¶
One model id for every launch, whatever tier a step declared and whatever the
tier mapping says. AMPLIHACK_FORCE_MODEL sets the same
thing for one run.
This is the only setting that replaces a concrete --model already on a
launched command line, which is a deliberate exception to issue #1527. It
fires only from your own user file or your own environment, and the stderr
line names it as the origin:
amplihack: model.force is set, so `claude` is launched with `--model claude-sonnet-5-5` whatever the step asked for. Unset model.force or AMPLIHACK_FORCE_MODEL to restore per-step tiers.
Like every other model line amplihack prints, it ends by naming the setting that controls it, so the line and the lever cannot drift apart.
The reasoning effort of the step's tier still applies, so forcing one model across a mixed-tier recipe does not flatten Codex effort to a single value. A launch through the LiteLLM gateway ignores it, as it ignores tiers.
The value is validated the way agent.binary is: at most 128 bytes, no
control characters or whitespace, none of /, \, ;, $, a backtick, ' or ", not starting
with -, and drawn from letters, digits and . _ [ ] @ : -. It lands as the
argument right after --model, and both Codex and Claude Code have
single-token flags that bypass their sandbox, so a value that could act as
another argument is rejected rather than passed on.
User-only.
model.tier_map¶
Where the model tier mapping is read from.
model.tier_map names the mapping file. Unset, amplihack reads
$AMPLIHACK_HOME/model-tiers.toml, then ~/.amplihack/model-tiers.toml.
Exactly one file is read, and its entries merge cell by cell over the mapping
that ships with amplihack. A cell the file names replaces the shipped cell
whole, so a [codex.<tier>] cell that names a model restates its effort.
Per-step tier overrides live in the same file, in its [step_tiers] table.
The file is read once per process through the same reader every other
amplihack config file uses: at most 64 KiB, regular files only, opened
non-blocking, so a FIFO, device file or directory is reported rather than
read. A symlink that resolves to a regular file is followed, exactly as
~/.amplihack/config.toml is; a dangling one is reported rather than taken
for "no file". A file amplihack cannot use produces one stderr line naming it
and the reason, and the shipped mapping then applies.
Both keys are user-only, like every path-valued key. A project file arrives with a repository you may have just cloned, and these files drive amplihack's rewriting of recipe YAML, whose steps run shell commands.
Review keys¶
Whether the separate code, security and philosophy review passes of the refactor-review phase may run as one combined pass on a small change.
review.combined_small_diffturns it on. Defaultfalse, so the three passes run separately exactly as they did before the setting existed.review.combined_diff_thresholdis the changed-line count at or below which a diff counts as small. Default200, accepted range 1 to 100000.
amplihack config set review.combined_small_diff true
amplihack config set review.combined_diff_threshold 120
Above the threshold the three passes run separately whatever the first key says. Both keys are user-only: the review step reads them from inside the worktree under review, so a project value would let a cloned repository decide that its own security and philosophy passes do not run. This applies to the refactor-review phase of a build, not to PR review. See Combined review for small diffs.
Governor keys¶
Settings for the capacity governor, which decides
when recipe run, claude and launch may start.
| Key | Effect |
|---|---|
governor.enabled |
Turns the governor on or off. Off by default: the governor is opt-in, because the owner has retired admission controls and capacity holds. AMPLIHACK_GOVERNOR (off, 0, false, on, 1, true) outranks it. |
governor.max_concurrency |
Highest concurrency limit; the limit never goes below 1. |
governor.reserve_points |
Weekly points kept for coordination, recovery and review work. |
governor.step |
How far one rate evaluation moves the limit. |
governor.band_pct |
Width of the band around the sustainable rate in which the limit stays put. |
governor.eval_interval_secs |
Shortest time between two rate evaluations. |
governor.wait_secs |
Default longest wait for admission; 0 means do not wait. |
governor.max_reading_age_secs |
Oldest stored usage reading the governor trusts for room; a profile with an older reading is left out of the pool unless that reading shows a window exhausted with its reset still ahead, in which case it stays in the pool as exhausted. |
All eight are user-only, so a project file cannot turn the governor on or off, or loosen it.
The Keys table lists no environment variable or flag for these keys. The
governor reads AMPLIHACK_GOVERNOR, AMPLIHACK_GOVERNOR_WAIT and
--governor-wait itself, because they accept values the config file does not
(off, 15m). They outrank governor.enabled and governor.wait_secs, but
config get --show-origin does not see them and reports the file or default
the key came from.
amplihack config set governor.enabled true
amplihack config set governor.max_concurrency 2
amplihack config set governor.wait_secs 1800
agent.standing¶
Whether a session started with amplihack claude --supervise NAME is a
standing session. When its Claude Code process exits for any reason other
than you ending it, the wrapper relaunches it in the same pane with
claude --continue. See
Keep a session running after its process exits.
The value is true or false, and the default is false.
--standing and --no-standing on amplihack claude --supervise override the
key for one launch. The key applies to every supervised session of the user
account; to mark one session and not another, use the flag.
The key is user-only, because it makes amplihack start agents without anyone
at the keyboard: a project-scoped agent.standing is reported and ignored, so
a cloned repository cannot make your sessions standing. A user file that
cannot give the key a value (unreadable, not true or false) is read as
false, with a warning on stderr.
sessions.daily_archive¶
Whether the Claude login rotator runs its
daily session archive,
which moves session logs older than three days out of ~/.claude/projects.
On by default.
The rotator reads the key from the user file each time a run is due, so a
change reaches a rotator that is already running. It has no environment
variable: the background rotator does not inherit the launching shell's
AMPLIHACK_ROTATE* variables, so a variable would not reach it. It is
user-only, because it decides whether files are removed from your home
directory; a project file's sessions.daily_archive is reported and ignored.
Because the run removes files, the rotator treats a user file it cannot use
as off for that day, not as the default: a file that cannot be read or
parsed, a value that is not true or false, or a file that group or
others can write. The rotator log then says
sessions archive: cannot read sessions.daily_archive (<why>); not run.
sessions.archive_days and sessions.archive_dest¶
The days and the destination for
amplihack sessions archive,
sessions restore and the rotator's
daily session archive.
A session is archived when nothing in it has been written for
sessions.archive_days days. Archives, the manifest and the lock go in
sessions.archive_dest, which must be an absolute path to a directory you
own that group and others cannot write, outside ~/.claude/projects.
--days and --dest override the keys for one command.
amplihack config set sessions.archive_days 7
amplihack config set sessions.archive_dest /mnt/backup/claude-sessions
The command and the rotator read the keys from the user file each time
they start a run, so a rotator that is already running uses a new value
from its next run, and sessions restore looks in the directory the daily
run wrote to. They have no environment variables: a rotator keeps the
environment it was started with, so a variable exported later in a shell
would reach restore but not the rotator. Both are user-only; a project
file's value is reported and ignored.
As with sessions.daily_archive, a user file that cannot give a key a
value is not replaced by the default. The command prints
cannot read <key> (<why>) and exits 1, and the daily run logs
sessions archive: cannot read <key> (<why>); not run. A flag still works,
because the key is then not read.
policy.deny_commands¶
Extra entries for amplihack's
dangerous-command policy, the list it writes
into Claude Code's permissions.deny, the Codex execpolicy rules file and the
Copilot CLI command line.
This key is set by editing the user file:
$ amplihack config get policy.deny_commands --show-origin
shutdown, systemctl stop, docker rm -f # user (/home/alice/.amplihack/config.toml)
The entries print on one line, separated by ,; a comma is not an accepted
character in an entry, so the separator is unambiguous. config get prints
one value and --show-origin adds one trailing comment for it, not one per
entry. config list prints every value in TOML syntax rather than bare, so
its row reads
policy.deny_commands = ["shutdown", "systemctl stop", "docker rm -f"], and
(unset) when the key is absent. config set policy.deny_commands <value>
is a usage error that names the file to edit. config unset
policy.deny_commands removes the key.
- Entries are added after the shipped defaults, in the order written, with duplicates removed. An entry can never remove a default; there is no removal mechanism for the defaults.
- The list holds at most 64 entries. A longer list is reported and ignored, on the same terms as a bad entry.
- Each entry is a command prefix: ASCII letters, digits and
. _ / @ = + -, single spaces between 1 to 8 tokens, 1 to 128 bytes. Quotes, backslashes, parentheses, colons, globs, control characters and NUL are rejected, because each is syntax in at least one harness's rule format. One rejected entry is reported once and rejects the whole value, which then reverts to unset: an entry silently dropped from a deny list would leave a shorter list that is still believed. The shipped defaults live in code and are written either way, so a bad line here cannot switch the policy off. - The key is user-only, because it decides what your agents may run. A project file's value is reported and ignored, and an insecure user file (group- or world-writable, or owned by somebody else) contributes no entries, while the shipped defaults are still written.
- On Copilot CLI the entries become command-line arguments of the launched
process, so they are readable by every user on the host through
/proc. Write short command prefixes only: a host name, a service name, a login or anything else you would not publish does not belong in this list. The shipped defaults are command names and reveal nothing; what you add is yours to judge. This is the same rule that keeps prompt text out of argv.
The defaults apply whether or not this key is set. Claude Code and Copilot
CLI pick a change up on the next launch; a Codex rules file is refreshed on
the next amplihack codex. Run amplihack update after changing it to
write every harness at once, and to reach the managed profiles, which only
an install refreshes.
text.routing and text.prompt_preferences¶
Two switches for text that amplihack inserts into a session. Both take on
or off, default to on, and may be set in the user file or a project
file. With nothing set, a session receives the same text as before these
keys existed.
text.routing = "off"leaves out the routing reminder on prompt events, the session-start section that sends development and investigation work to the orchestrator, and the router lines of the launch contract. The contract keeps its rules on waiting and on stopping processes. The text that tells a nested recipe session not to start a workflow stays.text.prompt_preferences = "off"leaves out the preferences table and the learned-patterns line that the prompt-event hook adds. The preferences inserted at session start stay. A recipe step never receives this table on a prompt event, whatever the key says.
AMPLIHACK_ROUTING_TEXT and AMPLIHACK_PROMPT_PREFERENCES set the same
values for one launch. The hook program reads these keys with the same code
as amplihack config get, so the two report the same value. A value that is
neither on nor off, in the variable or in a file, leaves on in force:
the hook reports it once on stderr, and config get prints on. The layers
below an unknown value are not consulted.
The how-to is Switch off the routing text and the repeated preferences table.
The config command¶
amplihack config get <KEY> [--show-origin]
amplihack config set <KEY> <VALUE> [--project]
amplihack config unset <KEY> [--project]
amplihack config list [--show-origin]
amplihack config edit [--project]
amplihack config path
set, unset and edit act on the user file unless you pass --project.
--project outside a git repository is a usage error.
Every subcommand, including the read-only get, list and path, loads the
config, and loading the config runs the one-time
migration when a legacy file is waiting.
stdout carries only the data described below. Warnings and errors go to stderr.
config get¶
Prints the effective value of one key, as a bare value with no quotes. An unset key prints an empty line and exits 0. An unknown key is a usage error.
$ amplihack config get agent.binary
claude
$ amplihack config get agent.binary --show-origin
claude # user (/home/alice/.amplihack/config.toml)
$ amplihack config get recipe.step_timeout
config set¶
Validates the value, writes it, and prints what it wrote and where.
$ amplihack config set orchestrator.max_depth 2 --project
set orchestrator.max_depth = 2 in /home/alice/src/myapp/.amplihack/config.toml
$ amplihack config set orchestrator.max_depth 99
error: orchestrator.max_depth: must be an integer from 0 to 32
$ echo $?
2
$ amplihack config set paths.home /opt/amplihack --project
error: paths.home: can only be set in the user file
set refuses to write a file that has a TOML syntax error, and exits 1. Fix
it with amplihack config edit first. Comments and formatting in the file are
kept.
Bools accept true and false. Integers are decimal.
config unset¶
Removes a key from the file. Removing a key that is not set is a no-op that exits 0.
$ amplihack config unset recipe.verbose
unset recipe.verbose in /home/alice/.amplihack/config.toml
$ amplihack config unset recipe.verbose
recipe.verbose is not set in /home/alice/.amplihack/config.toml
config list¶
Prints every key, in the order of the Keys table, one per line:
Values are written in TOML syntax: strings quoted, bools and integers bare.
A key with no value prints (unset). With --show-origin, each line gains two
spaces and # <origin>:
| Origin | Printed as |
|---|---|
| environment | # env (AMPLIHACK_MAX_DEPTH) |
| environment, invalid value | # env (invalid: AMPLIHACK_MAX_DEPTH is not an integer) |
| a file | # project (<path>), # user (<path>), # legacy (<path>) |
| built-in | # default |
When any file has a problem, a Config problems: block follows the rows. See
Validation and diagnostics. list exits 0 even
when it prints problems.
$ AMPLIHACK_MAX_DEPTH=5 amplihack config list --show-origin
agent.binary = "claude" # user (/home/alice/.amplihack/config.toml)
paths.home = (unset) # default
node.heap_consent = true # user (/home/alice/.amplihack/config.toml)
node.max_old_space_mb = (unset) # default
recipe.verbose = false # default
recipe.step_timeout = 1800 # project (/home/alice/src/myapp/.amplihack/config.toml)
recipe.detach = "none" # default
recipe.tmux_session_pattern = "amp-{recipe}-{repo}-{ts}" # default
recipe.log_dir = (unset) # default
orchestrator.max_depth = 5 # env (AMPLIHACK_MAX_DEPTH)
Config problems:
/home/alice/src/myapp/.amplihack/config.toml: paths.home: can only be set in the user file; ignored
An invalid environment value is shown with its origin, but amplihack keeps its existing handling of that variable: each consumer parses its own variable, as before.
config edit¶
Opens the file in $VISUAL, then $EDITOR, then vi. The editor is never
read from a config file. The path is passed as a separate argument, so a path
with spaces or shell metacharacters is safe.
- The parent directory is created (mode 0700) if it does not exist.
- After the editor exits, the file is validated. Any problems are printed and the command exits 1. The file is kept as you wrote it.
config path¶
Prints the files amplihack reads:
$ amplihack config path
user: /home/alice/.amplihack/config.toml
project: /home/alice/src/myapp/.amplihack/config.toml
legacy: /home/alice/.amplihack/config
project:is the file the search found, or the file--projectwould create. Outside a git repository it readsproject: (none: not in a git repository).- The
legacy:line appears only while~/.amplihack/configstill holdsnode_options_consentornode_options_limit_mb, that is, while a migration is waiting or could not complete. A legacy file that holds only other settings, such asgit_identity, is not listed.
Exit codes¶
| Code | Meaning |
|---|---|
0 |
Success. Also: get of an unset key, unset of an absent key, and list with problems. |
1 |
Runtime or state error: an unreadable or unwritable file, set on a file with a syntax error, edit that leaves problems. |
2 |
Usage error: an unknown key, an invalid value, a user-only key with --project, --project outside a git repository. |
Validation and diagnostics¶
config set and config unset validate before writing. A hand-edited file is
checked every time it is read:
- An unknown key, a bad value, or a key in the wrong file is reported and that key falls back to the lower layers. The rest of the file still applies.
- A TOML syntax error makes amplihack ignore the whole file. The report gives the line and column, never the file's contents.
- A file that is not a regular file, or is larger than 64 KiB, is ignored
and reported. A FIFO or
/dev/zerocannot hang a command.
Every command that reads the config prints each problem once per process, on stderr, and keeps running:
warning: /home/alice/.amplihack/config.toml: orchestrator.max_depth: must be an integer from 0 to 32
warning: /home/alice/src/myapp/.amplihack/config.toml: TOML syntax error at line 4, column 9; file ignored
config list and amplihack doctor print the same problems in a
Config problems: block, one per line, indented by two spaces, as
<path>: <key>: <reason>, or <path>: <reason> for a whole-file problem.
Keys, values and paths taken from a file are escaped before they are printed: control characters, DEL and bidirectional overrides are shown as escapes, and anything longer than 200 characters is truncated.
Trust rules¶
The user file is yours. The project file arrives with a repository you may have just cloned, so it is trusted less.
- The user file must be owned by you and not writable by group or others.
If it is not, its user-only keys (
agent.binary,paths.home,node.*,recipe.log_dir,model.*,review.*,governor.*,sessions.*,policy.deny_commands) are ignored and reported. Its other keys still apply. - The project file never names a path, a command, an executable or the
agent CLI.
agent.binaryand every path-valued key are user-only. - The project file cannot choose a model, the tier mapping or the review
passes.
model.force,model.tier_mapand bothreview.*keys are user-only. A forced model becomes the argument right after--model;model.tier_mapnames the file that drives amplihack's rewriting of recipe YAML, whose steps run shell commands; and the review step reads thereview.*keys from inside the worktree under review, so a project value would let a repository decide whether its own security pass runs. - The project file cannot change the capacity governor. Every
governor.*key is user-only. config set --projectandconfig edit --projectrefuse a projectconfig.tomlthat is a symlink, or whose directory resolves outside the git repository, and exit 1.- The project file can only lower
orchestrator.max_depthandrecipe.step_timeout. The result is the smaller of the project value and the user value (or the default). A higher project value is ignored and reported:
warning: /home/alice/src/myapp/.amplihack/config.toml: orchestrator.max_depth: 8 is above the user value 3; a project file can only lower it
- Environment variables still win. A project file never overrides a variable you exported.
Migration from ~/.amplihack/config¶
Earlier versions saved the NODE_OPTIONS consent in ~/.amplihack/config as
JSON (node_options_consent, node_options_limit_mb). Every amplihack
process that loads the config checks that file. When it holds either key, the
process migrates it:
- It parses the JSON. A file that is not a JSON object, or has values of the wrong type, is reported as a config problem and left untouched. It never causes a crash.
- It writes
node_options_consenttonode.heap_consentin~/.amplihack/config.toml, unless that file already setsnode.heap_consent. If the user file already sets it, that value is kept and the legacy value is discarded. - It removes the two keys from the legacy file:
- If the file holds nothing but
node_options_consentandnode_options_limit_mb, it is renamed to~/.amplihack/config.json.migrated. - Otherwise it is rewritten in place without those two keys. Every other
key, such as the
git_identityblock, keeps its value. Whitespace and key order may change. The rewrite is atomic, like every other config write (see How files are written).
Step 3 runs only after step 2 has succeeded, so the consent always exists in at least one file. After step 3 the legacy file holds nothing amplihack reads, so the user file is the only place the consent lives.
When migration runs¶
- The migration runs on any config load. Read-only commands count:
config get,config list,config path,amplihack doctorand every launch. The first of them after an upgrade may create~/.amplihack/config.tomland rename or rewrite~/.amplihack/config. Later loads find no legacy keys and write nothing. - A legacy file with neither key, for example one that holds only
git_identity, is never written and is not a config layer.
Details¶
node_options_limit_mbis not copied tonode.max_old_space_mb. It only recorded the recommendation at the time it was saved; the limit is still computed from RAM on each launch, exactly as before. Setnode.max_old_space_mbyourself to pin a limit.amplifier-bundle/tools/git-identity.shreads agit_identityblock from JSON files. It checks$AMPLIHACK_CONFIG,$HOME/.amplihack/config,$AMPLIHACK_HOME/configand$AMPLIHACK_HOME/.amplihack/config. Only$HOME/.amplihack/configis migrated, and the migration keeps itsgit_identityblock where the script looks for it. amplihack never reads or writes the other three paths.- If step 2 or step 3 fails, for example because
$HOMEis read-only, the remaining legacy keys are still read as thelegacylayer. The migration is retried on the next load and a config problem is printed until it succeeds. Your consent is never lost:
$ amplihack config get node.heap_consent --show-origin
true # legacy (/home/alice/.amplihack/config)
config set node.heap_consentandconfig unset node.heap_consentrun the migration first. If the legacy keys cannot be removed, the command exits 1 without changing anything. Otherwise the legacy layer would serve the old consent again after anunset, or migrate it back on the next load.- Apart from the migration, nothing writes the JSON file.
Where the effective config is reported¶
amplihack doctorprints anEffective configsection with the same rows asconfig list --show-origin, followed by anyConfig problems:. The section is informational: it never makesdoctorfail. See amplihack doctor.amplihack recipe runaddsagent_binary,agent_binary_sourceandamplihack_hometo both itsearlyandfinalamplihack.recipe.log_pointerevents, so a run's log records which CLI it used and why:
amplihack.recipe.log_pointer {"schema_version":1,"event":"early","run_id":"5b60657b-76ef-4f49-8a22-8b89ed75f43e","recipe_name":"default-workflow","cwd":"/home/alice/src/myapp","worktree":"/home/alice/src/myapp","branch":"main","runner_path":"/home/alice/.local/bin/recipe-runner-rs","agent_binary":"claude","agent_binary_source":"user_config","amplihack_home":"/home/alice/.amplihack","timestamp":"2026-06-12T03:55:11Z"}
How files are written¶
- Writes are atomic: a temporary file with a random name in the same directory, set to mode 0600 before anything is written, synced, then renamed over the target. A reader never sees a half-written file.
- One write is not synced: the launcher's save of
node.heap_consenton the first launch. It is still atomic and 0600, but skips thefsync, which took 9.76 s on a host under write load and delayed claude's start. If a crash loses it, the next launch asks again.config set,config unsetand the migration from~/.amplihack/configall sync.config edithands the file to your editor, which decides how it is written. See Config Write Durability. - The user file is created with mode 0600. A new
~/.amplihackis created with mode 0700; an existing one that you own loses group and other access. Your own permission bits are never widened. - An existing project
.amplihack/directory is never chmodded. - If the target is a symlink, amplihack writes the file it points to and keeps
the symlink. A dotfiles setup that links
~/.amplihack/config.tomlinto a repository keeps working.
Related¶
- AMPLIHACK_* Environment Variable Audit — Every
AMPLIHACK_*name in the code, classified, with its config key where one exists - Environment Variables — What each variable does
- Active Agent Binary — The full agent-binary resolver, including the
user_configlayer - amplihack doctor — The
Effective configsection - Model Tiers — What the
model.*andreview.*keys control: the tier vocabulary, the per-harness mapping, precedence and the run-summary section - Capacity Governor: What the
governor.*keys control - Memory Configuration Consent — The NODE_OPTIONS prompt whose answer
node.heap_consentstores - Config Write Durability: Why the launcher's consent save skips the
fsyncthat other config writes perform - Dangerous Command Policy: The policy list
policy.deny_commandsadds to, and the files each harness receives