AMPLIHACK_* Environment Variable Audit¶
Every distinct AMPLIHACK_* name that appears in crates/ and bins/, with
what it is for and, where one exists, the
user config key that sets the same thing. Use this table to
decide whether a variable is yours to set.
How this table is generated¶
The name list comes from this command, run at the repository root:
Every name it prints has exactly one row below. When code adds or removes a name, rerun the command and update the table in the same change.
The grep also finds identifiers that are not environment variables: Rust constants, marker strings, heredoc delimiters, and prefixes of a variable family named in help text. They are listed so the table stays complete; their note starts with "Not an env var".
Categories¶
| Category | Meaning |
|---|---|
| user preference | You may set it to change amplihack's behaviour. It stays supported. |
| internal | amplihack sets it for its own children, or it is not a variable at all. Do not set it by hand. |
| test-only | Read or set only by tests and test fixtures. It has no effect in normal use. |
A variable with a config key keeps working and outranks the config files. See Precedence.
Variables¶
| Name | Category | Config key | Note |
|---|---|---|---|
AMPLIHACK_1552_REQUIRE_RECIPE_RUNNER |
test-only | Makes the #1552 integration test fail instead of skip when no runner is installed. | |
AMPLIHACK_1570_REQUIRE_RECIPE_RUNNER |
test-only | Same, for the #1570 context-file test. | |
AMPLIHACK_AGENTS |
internal | Not an env var: the hooks crate's static list of known agent names. | |
AMPLIHACK_AGENT_BINARY |
user preference | agent.binary |
Agent CLI override; also exported to children with a source tag. |
AMPLIHACK_AGENT_BINARY_SOURCE |
internal | Tag describing where an exported AMPLIHACK_AGENT_BINARY came from (session:, default:, tmux_server:, user_config:). |
|
AMPLIHACK_ALLOW |
test-only | Not an env var: half of a split string in a runner-ancestry test that proves the unreleased pre-#1593 name no longer forces a downgrade. | |
AMPLIHACK_AMPLIHACK_BINARY_PATH |
test-only | Instance of the AMPLIHACK_<TOOL>_BINARY_PATH lookup, set only by blarify tests. |
|
AMPLIHACK_AMPLIHACK_HOOKS_BINARY_PATH |
internal | AMPLIHACK_<TOOL>_BINARY_PATH lookup for amplihack-hooks during install, and for the hook command a local-model Codex launch writes; there the result must be an absolute path to a file named amplihack-hooks. |
|
AMPLIHACK_ARTIFACT_GUARD_BASELINE |
internal | Baseline handed to the artifact guard by workflow steps. | |
AMPLIHACK_ARTIFACT_GUARD_PREEXISTING |
internal | Pre-existing paths handed to the artifact guard by workflow steps. | |
AMPLIHACK_ASSET_RESOLVER |
internal | Path to amplihack-asset-resolver, exported to recipe steps. |
|
AMPLIHACK_AUTO_MAX_TURNS |
user preference | Default --max-turns for auto mode (clap env). |
|
AMPLIHACK_AUTO_MODE |
internal | Marks a process started by auto mode. | |
AMPLIHACK_AUTO_SWITCH_SUPERVISED |
internal | Marks a Claude process supervised by profile auto-switch. | |
AMPLIHACK_AUTO_SWITCH_TEST_ABORT_AFTER |
test-only | Fault injection for the auto-switch swap. | |
AMPLIHACK_BADTOOL_BINARY_PATH |
test-only | binary_finder unit-test instance of AMPLIHACK_<TOOL>_BINARY_PATH. |
|
AMPLIHACK_BLARIFY_MODE |
user preference | Blarify indexing mode. | |
AMPLIHACK_CLAUDE_AUTO_SWITCH |
user preference | Enables Claude profile auto-switch. | |
AMPLIHACK_CLAUDE_BINARY_PATH |
user preference | Path to the claude executable. |
|
AMPLIHACK_CLAUDE_PROFILE |
user preference | Claude profile to launch with. | |
AMPLIHACK_CLAUDE_PROFILE_ROOT |
user preference | Directory that holds Claude profiles. The test helper isolated(..) removes it from every child; see Keep Tests out of the Real Profile Root. |
|
AMPLIHACK_CLEANUP_KEEP_HOURS |
user preference | Hours run-owned worktrees and targets are kept after a run's PR closes or the run ends, and the minimum age of untagged targets and system temporary leftovers (not run-tmp); default 24, maximum 87600. See Settings. |
|
AMPLIHACK_CLEANUP_ON_EXIT |
user preference | 0 skips the end-of-run cleanup sweep; default 1. The run's runtime/ folder is still removed. See What happens when a run ends. |
|
AMPLIHACK_CLEANUP_PRIVATE_TARGET_DIR |
launcher | Off unless the trimmed value is exactly 1, the inverse of AMPLIHACK_CLEANUP_ON_EXIT. 1 states that the folder named by CARGO_TARGET_DIR belongs to this run alone, so the run removes it when it ends. It is an assertion of exclusive ownership of the whole folder and is not verified. A folder is refused with a warning when it is a symbolic link, is not owned by you, has a parent that other users can write to (without the sticky bit), is a mount point or has one directly inside it, is a git checkout, or lacks a Cargo marker while holding files; the full list of checks is in the how-to. A mount deeper inside is not detected, and an active build is protected only by one non-waiting attempt on each .cargo-lock the folder and its immediate subfolders hold. The runner exports it as empty to steps, including under --dry-run; --detach passes the launcher's value to the pane. See Remove a run's own build output. |
|
AMPLIHACK_CLI_INTEGRATION_QUIET_CHILD |
test-only | Test-support child-process switch. | |
AMPLIHACK_CODEX_BINARY_PATH |
test-only | Set only by install tests; the lookup itself is AMPLIHACK_<TOOL>_BINARY_PATH. |
|
AMPLIHACK_CODEX_LOCAL_MODEL |
user preference | Codex profile name that makes amplihack codex a local-model launch; the environment form of --local-model, for recipe agent steps. The flag wins; empty means unset; an invalid name is an error. See Codex Local-Model Launches. |
|
AMPLIHACK_CODEX_TERMINAL_TEST_FIXTURE |
test-only | Launcher test fixture switch. | |
AMPLIHACK_CODEX_USAGE_TIMEOUT_SECS |
user preference | Seconds each Codex account's live rate-limit read may take in amplihack profile usage, 1 to 300; default 20. Any other value warns once and uses the default. See Codex read deadline. |
|
AMPLIHACK_CONTEXT |
internal | Prefix of the AMPLIHACK_CONTEXT_<KEY> variables recipe run exports for context values. |
|
AMPLIHACK_CONTEXT_ENV_BUDGET_BYTES |
user preference | Size budget for context values exported as env vars. | |
AMPLIHACK_CONTEXT_FILE |
internal | Path of the context file recipe run hands to the runner. |
|
AMPLIHACK_CONTEXT_START |
internal | Not an env var: marker string around injected context. | |
AMPLIHACK_COPILOT |
test-only | Not an env var: fixture string in the #1481 test. | |
AMPLIHACK_COPILOT_BINARY_PATH |
test-only | Set only by prompt-delivery tests; the lookup itself is AMPLIHACK_<TOOL>_BINARY_PATH. |
|
AMPLIHACK_COPILOT_NO_ALLOW_ALL |
user preference | Stops amplihack copilot from passing --allow-all-*. |
|
AMPLIHACK_DATABASE_PASSWORD |
internal | Example secret the Docker launcher must not forward; named in its test. | |
AMPLIHACK_DEBUG |
internal | Not read: example name in amplihack-state EnvVar docs. |
|
AMPLIHACK_DEFAULT_MODEL |
user preference | Default model for Claude-compatible launches. Set to a non-blank value it also replaces the model a model tier maps to on the claude column, below AMPLIHACK_FORCE_MODEL and below a concrete --model on the command line. A recipe agent step does not read it at all, so it never replaces a step's tier; pin a run's steps with AMPLIHACK_FORCE_MODEL. Codex and Copilot CLI do not read it; give them a model with a [codex.<tier>] model or [copilot.<tier>] model cell. |
|
AMPLIHACK_DELEGATE |
user preference | Delegate command for multitask workstreams. | |
AMPLIHACK_DELIVERY_WORKER |
test-only | Re-exec switch for the freshness delivery test worker. | |
AMPLIHACK_DEPTH |
internal | Launch nesting depth exported to children. | |
AMPLIHACK_DISABLE_BLARIFY |
user preference | Disables blarify indexing in the session-start hook. | |
AMPLIHACK_DOWNGRADE_GUARD_WORKER |
test-only | Re-exec switch for the downgrade-guard test worker. | |
AMPLIHACK_ENABLE_BLARIFY |
user preference | Opts in to blarify indexing. | |
AMPLIHACK_ENABLE_REFLECTION |
user preference | Enables the stop-hook reflection. | |
AMPLIHACK_EXTERNAL_OTLP_AUTHORIZATION |
internal | OTLP header the Docker launcher must not forward; named in its filter. | |
AMPLIHACK_FLEET_EXISTING_VMS |
user preference | Existing VMs for amplihack fleet to use. |
|
AMPLIHACK_FLEET_REASONER_BINARY_PATH |
user preference | Path to the fleet reasoner's CLI. | |
AMPLIHACK_FORCE_MODEL |
user preference | model.force |
One model id for every launch, whatever tier a step declared. The one setting that replaces a concrete --model already on the command line. Ignored on a LiteLLM gateway launch. |
AMPLIHACK_FORCE_RECIPE_RUNNER_DOWNGRADE |
user preference | Allows installing an older recipe runner. | |
AMPLIHACK_GIT_1278_CHILD |
test-only | Re-exec switch for the #1278 git test. | |
AMPLIHACK_GIT_1278_PLAIN |
test-only | Re-exec switch for the #1278 git test. | |
AMPLIHACK_GUIDANCE_STEP_ID |
internal | Id of the running agent step, set by the agent launcher on its child inside a recipe run (AMPLIHACK_RUN_GUIDANCE_DIRS set) and removed outside one. A new id for every launch; an inherited value is replaced. The step's PostToolUse and UserPromptSubmit hooks use it to give the step guidance appended while it runs, once. See Guidance for a running step. |
|
AMPLIHACK_GOVERNOR |
user preference | on, 1 or true turns the capacity governor on (it ships off); off, 0 or false turns it off. Read by the governor itself; outranks governor.enabled. |
|
AMPLIHACK_GOVERNOR_CLASS |
user preference | Default admission class for the capacity governor. | |
AMPLIHACK_GOVERNOR_MANIFEST |
user preference | Usage manifest that governor status reads for token_share. |
|
AMPLIHACK_GOVERNOR_PARENT |
internal | Tree id of the capacity governor slot held by the parent process; a start that matches a live slot runs nested under it. | |
AMPLIHACK_GOVERNOR_WAIT |
user preference | Default --governor-wait. Read by the governor itself; outranks governor.wait_secs. |
|
AMPLIHACK_GRAPH_DB_PATH |
internal | Code-graph database path exported to children. | |
AMPLIHACK_HOME |
user preference | paths.home |
Root for framework assets, hooks and runtime state. |
AMPLIHACK_HOOK_CONTRACT |
internal | Not an env var: suffix of the CANONICAL_AMPLIHACK_HOOK_CONTRACT constant. |
|
AMPLIHACK_HOOK_EVENT |
internal | Hook event name that the hooks binary sets on amplihack recipe guidance deliver. On PostToolUse, deliver wakes the goal-loop runs in the same work root that wait for the step's model service. See Waits after a failure before the agent starts. |
|
AMPLIHACK_HOOK_PROTOCOL |
internal | Hook wire protocol, set by the Codex plugin's wrapper script. | |
AMPLIHACK_HOOK_TEXT |
user preference | Exact none omits participating hooks' context text and skips Stop checks. Unset keeps existing behaviour. See Omit hook context text. |
|
AMPLIHACK_HOOK_SPECS |
internal | Not an env var: the install crate's hook spec table. | |
AMPLIHACK_IDLE_POLL_MS |
user preference | Idle-watchdog poll interval. | |
AMPLIHACK_IDLE_TIMEOUT_SECS |
user preference | Idle-watchdog timeout. | |
AMPLIHACK_INDICATORS |
internal | Not an env var: the project-init marker list. | |
AMPLIHACK_INSTRUCTIONS_END |
internal | Not an env var: end marker of staged Copilot instructions. | |
AMPLIHACK_INSTRUCTIONS_START |
internal | Not an env var: start marker of staged Copilot instructions. | |
AMPLIHACK_INVESTIGATION_REPORT_EOF |
test-only | Not an env var: heredoc delimiter in the #1552 test. | |
AMPLIHACK_IN_DOCKER |
internal | Marks a process running in amplihack's container. | |
AMPLIHACK_IN_UVX |
internal | Marks a process started through uvx. | |
AMPLIHACK_ISSUE1570_KEEP |
test-only | Keeps the #1570 test's temp files for inspection. | |
AMPLIHACK_IS_STAGED |
internal | Marks an auto-mode launch from a staged framework copy. | |
AMPLIHACK_KUZU_DB_PATH |
internal | Back-compat alias of AMPLIHACK_GRAPH_DB_PATH. |
|
AMPLIHACK_LAUNCHER |
internal | Launcher name recorded in launcher_context.json. |
|
AMPLIHACK_LITELLM |
internal | Prefix of the AMPLIHACK_LITELLM_* variables, named in help text. |
|
AMPLIHACK_LITELLM_API_KEY |
user preference | External LiteLLM gateway key. | |
AMPLIHACK_LITELLM_ENDPOINT |
user preference | External LiteLLM gateway URL. | |
AMPLIHACK_LITELLM_EXPECTED_GATEWAY_IDENTITY |
user preference | Gateway identity the preflight expects. | |
AMPLIHACK_LITELLM_EXPECTED_MODEL |
user preference | Model the preflight expects. | |
AMPLIHACK_LITELLM_EXPECTED_PROVIDER |
user preference | Provider the preflight expects. | |
AMPLIHACK_LITELLM_MODEL |
user preference | Model routed through the gateway. | |
AMPLIHACK_LITELLM_TARGET |
user preference | Agent CLI routed through the gateway. | |
AMPLIHACK_LITELLM_TELEMETRY_FILE |
user preference | Preflight telemetry output file. | |
AMPLIHACK_LITELLM_TELEMETRY_HMAC_KEY |
user preference | Key that signs preflight telemetry. | |
AMPLIHACK_LOG_ARCHIVE_DAYS |
user preference | Age in days after which amplihack cleanup archives recipe and session logs; default 30, maximum 36500. |
|
AMPLIHACK_LOG_ARCHIVE_DIR |
user preference | Folder for log archives and MANIFEST.jsonl; default <work root>/archive. See Archive and restore logs. |
|
AMPLIHACK_MAX_DEPTH |
user preference | orchestrator.max_depth |
Session-tree recursion ceiling for a new root; can only lower a sealed tree. |
AMPLIHACK_MAX_LOCK_ITERATIONS |
user preference | Lock-mode iteration cap in the stop hook. | |
AMPLIHACK_MAX_LOG_BYTES |
user preference | Multitask log size cap. | |
AMPLIHACK_MAX_PARALLEL_WORKSTREAMS |
user preference | Multitask wave width. | |
AMPLIHACK_MAX_SESSIONS |
user preference | Session-tree session cap. | |
AMPLIHACK_MEMORY |
internal | Prefix of the AMPLIHACK_MEMORY_* variables, named in docs. |
|
AMPLIHACK_MEMORY_BACKEND |
user preference | Memory backend selection. | |
AMPLIHACK_MEMORY_ENABLED |
user preference | Enables agent memory in the launcher crate. | |
AMPLIHACK_MEMORY_GOSSIP_ENABLED |
user preference | Distributed-memory gossip switch. | |
AMPLIHACK_MEMORY_QUERY_FANOUT |
user preference | Distributed-memory query fan-out. | |
AMPLIHACK_MEMORY_REPLICATION_FACTOR |
user preference | Distributed-memory replication factor. | |
AMPLIHACK_MEMORY_STORAGE_PATH |
user preference | Memory storage path. | |
AMPLIHACK_MEMORY_TOKEN_BUDGET |
user preference | Memory injection token budget. | |
AMPLIHACK_MEMORY_TOPOLOGY |
user preference | Distributed-memory topology. | |
AMPLIHACK_MEMORY_TRANSPORT |
user preference | Distributed-memory transport. | |
AMPLIHACK_MERGE_GUARD |
internal | Retired marker. Launch and recipe execution remove it; it grants no merge authority. | |
AMPLIHACK_MERGE_GUARD_USER_BASH_ENV |
internal | Retired compatibility value. When removing the exact retired guard BASH_ENV, launch restores this unrelated user path without sourcing the retired guard. |
|
AMPLIHACK_MIN_AVAILABLE_MIB |
user preference | Free-memory floor before a session-tree spawn. | |
AMPLIHACK_MODE |
user preference | Forces the detected framework mode. | |
AMPLIHACK_NONINTERACTIVE |
internal | Marks a delegated, non-interactive process; set by recipe run for every step. |
|
AMPLIHACK_NOT_SET_1551 |
test-only | Not an env var: a name an env-builder unit test checks is absent. | |
AMPLIHACK_NO_FRESHNESS_CHECK |
user preference | Skips the binary freshness check. | |
AMPLIHACK_NO_RUST_BOOTSTRAP |
user preference | Skips the Rust toolchain bootstrap. | |
AMPLIHACK_NO_SYSTEM_PROMPT_APPEND |
user preference | 1 skips the operating contract, its file under <home>/private/ and the Claude Code 2.1.319 version check. See Agent Prompt Channels. |
|
AMPLIHACK_NO_UPDATE_CHECK |
user preference | Skips the startup update check. | |
AMPLIHACK_NPM_VERSION |
test-only | Not an env var: placeholder in the plugin-manifest test. | |
AMPLIHACK_ORCHESTRATION_BOOTSTRAP |
test-only | Codex front-door contract fixture. | |
AMPLIHACK_ORIGINAL_CWD |
internal | Original directory handed to an auto-mode child. | |
AMPLIHACK_OTEL_ENABLED |
user preference | Enables OpenTelemetry export. | |
AMPLIHACK_PARITY_TEST |
test-only | Marks parity-test runs; skips the update prompt. | |
AMPLIHACK_PLUGIN_AUTO_INSTALL |
test-only | Plugin-manifest test fixture. | |
AMPLIHACK_PLUGIN_INSTALLED |
internal | Set by the Claude Code plugin's bootstrap. | |
AMPLIHACK_PLUGIN_INSTALL_LOCK |
test-only | Plugin-manifest test fixture. | |
AMPLIHACK_POST_UPDATE_INSTALL |
internal | Marks the install that follows a self-update. | |
AMPLIHACK_PROBE_BIN |
test-only | Probe binary path in update and install tests. | |
AMPLIHACK_PROFILE_USAGE_API_BASE |
user preference | Base URL of the OAuth usage endpoint for direct usage reads by amplihack profile usage and the rotator; default https://api.anthropic.com. Only https://, or http:// on 127.0.0.1, [::1] or localhost; any other value warns, without repeating it, and uses the default. See Direct read. |
|
AMPLIHACK_PROFILE_USAGE_DIRECT_PARALLEL |
user preference | Number of passive and direct usage reads run at once by amplihack profile usage and the rotator, 1 to 16; default 8. See Probe parallelism. |
|
AMPLIHACK_PROFILE_USAGE_PARALLEL |
user preference | Number of claude usage probes (fallbacks) run at once by amplihack profile usage and the rotator (whose live probe counts against it), 1 to 16; derived from CPUs and load when unset or empty. See Probe parallelism. |
|
AMPLIHACK_PROFILE_USAGE_PASSIVE_MAX_AGE_SECS |
user preference | Seconds a stored status-line reading in usage.json stays fresh enough for amplihack profile usage and the rotator to use without asking, 0 to 3600; default 300; 0 turns passive readings off. See Passive readings. |
|
AMPLIHACK_PROFILE_USAGE_PROBE |
user preference | How amplihack profile usage and the rotator read usage. Unset (default): a fresh passive reading, then a direct read of the OAuth usage endpoint, then claude (the get_usage request, then claude -p /usage) only if the direct read fails; for an account with usage credits on, profile usage takes the windows from the direct read, and runs a /usage spend probe only with --spend. direct: passive, then direct only; a failure reads error, no claude is started for a reading or a spend probe, an account with usage credits on gives its direct windows with spend not_probed (even with --spend), and overflow profiles read error (the rotator's held-cycle spend-limit check still starts claude). auto: claude only, the get_usage request with the /usage fallback. text: claude -p /usage only. Outside direct, profiles marked as overflow get /usage only. Matched exactly; empty counts as unset; any other value warns and uses the default order. See Probe method. |
|
AMPLIHACK_PROFILE_USAGE_TIMEOUT_SECS |
user preference | Seconds each profile's usage read may run in amplihack profile usage and the rotator, 1 to 600; default 120. It bounds a direct read, refresh included, and separately a claude fallback, covering the get_usage request and any /usage attempt. See Probe deadline. |
|
AMPLIHACK_PROFILE_USAGE_TOKEN_URL |
user preference | OAuth token URL used to refresh an expired login during a direct usage read; default https://platform.claude.com/v1/oauth/token. Same rules as AMPLIHACK_PROFILE_USAGE_API_BASE. See Token refresh. |
|
AMPLIHACK_PROFILE_USAGE_USABLE_SESSION_PCT |
user preference | Session percentage below which a login counts as usable now in the capacity summary of amplihack profile usage and the capacity: line of amplihack profile rotate status, 1 to 100; default 95. --usable-session-pct overrides it. Does not change any rotation or auto-switch threshold. See Usable now. |
|
AMPLIHACK_PROJECT_ID |
user preference | Memory learning project id. | |
AMPLIHACK_PROJECT_ROOT |
internal | Project root exported by the uvx manager. | |
AMPLIHACK_PROMPT_DELIVERY |
user preference | Prompt delivery mode for agent subprocesses: auto (default), stdin or tempfile. No value puts the prompt in argv: any other value, including argv, logs a warning and is treated as auto. Never set it in recipes or bundle config. See Agent Prompt Channels. |
|
AMPLIHACK_PROMPT_PREFERENCES |
user preference | text.prompt_preferences |
off leaves out the preferences table and learned-patterns line on prompt events. See Switch off the routing text. |
AMPLIHACK_QUEUE_PATH |
test-only | Fleet test fixture. | |
AMPLIHACK_RECIPE_LOG |
internal | Absolute path of a detached run's recipe log, exported by amplihack recipe run --detach so each step can append its usage-limit wait's start and end lines to it. Inherited by nested foreground runs, which append to the enclosing run's log; a nested detached run overwrites it with its own. Never read from configuration. See The wait in the recipe log. |
|
AMPLIHACK_RECIPE_LOG_JSONL |
user preference | Path for structured runner events. | |
AMPLIHACK_RECIPE_RUNNER_TIMEOUT_SECS |
user preference | Whole-run wall-clock limit for the recipe runner. | |
AMPLIHACK_RECIPE_RUN_ID |
internal | Run id recipe run hands to the runner; a new one for each attempt, including transient retries. A launch that sees it set and non-empty never starts the profile rotator, and a change: line in the rotate log records it as recipe_run=<id>; see Rotate autostart. |
|
AMPLIHACK_RECIPE_TRANSIENT_BUDGET_SECS |
user preference | Time budget for transient-failure retries. | |
AMPLIHACK_RECIPE_TRANSIENT_MAX_ATTEMPTS |
user preference | Attempt cap for transient-failure retries. | |
AMPLIHACK_REFLECTION_BINARY |
user preference | CLI the reflection hook runs. | |
AMPLIHACK_RELEASE_VERSION |
internal | Release version stamped at build time. | |
AMPLIHACK_REMOTE_RETRY_BUDGET_SECS |
user preference | Retry budget for remote calls. | |
AMPLIHACK_REPAIR_ORIGINAL_PATH |
internal | Caller's PATH handed to the post-update repair. | |
AMPLIHACK_REPO_PATH |
user preference | Default repo_path context for recipe run and multitask. |
|
AMPLIHACK_REPO_URI |
internal | Not an env var: constant in the reflection prompt. | |
AMPLIHACK_RESULT_SINK |
internal | Clean result channel path handed to agent children. | |
AMPLIHACK_RESULT_V1 |
internal | Not an env var: result line prefix in the LiteLLM preflight. | |
AMPLIHACK_ROOT |
internal | Legacy root printed by uvx-help. |
|
AMPLIHACK_ROTATE |
internal | Not an env var: the prefix the profile rotator strips from its probe child's environment. | |
AMPLIHACK_ROTATE_AUTOSTART |
user preference | 0/off stops launches from starting the profile rotator and 1/on lets them, overriding the saved autostart setting; see Rotate autostart. The test helper isolated(..) sets it to 0. |
|
AMPLIHACK_ROTATE_HOLD |
user preference | Default for amplihack profile rotate --hold. |
|
AMPLIHACK_ROTATE_INTERVAL |
user preference | Default for amplihack profile rotate --interval. |
|
AMPLIHACK_ROTATE_MARGIN |
user preference | Default for amplihack profile rotate --margin. |
|
AMPLIHACK_ROTATE_OVERFLOW_UNKNOWN_RESET |
user preference | Default for amplihack profile rotate --overflow-unknown-reset (0 or 1, default 0); auto-switch reads it only while no rotator runs, and otherwise uses the running rotator's value. |
|
AMPLIHACK_ROTATE_OVERFLOW_WAIT |
user preference | Default for amplihack profile rotate --overflow-wait; auto-switch reads it only while no rotator runs, and otherwise uses the running rotator's value. |
|
AMPLIHACK_ROTATE_SESSION_AT |
user preference | Default for amplihack profile rotate --session-at; also auto-switch's plan-capacity test for overflow while no rotator runs. |
|
AMPLIHACK_ROTATE_TARGET_WEEK_MAX |
user preference | Default for amplihack profile rotate --target-week-max (1-100, default 95): a login whose week use is above it is never a move target. Auto-switch does not read it; see Rotate target choice. |
|
AMPLIHACK_ROTATE_UPGRADE_MARGIN |
user preference | Default for amplihack profile rotate --upgrade-margin. |
|
AMPLIHACK_ROTATE_WEEK_AT |
user preference | Default for amplihack profile rotate --week-at; also auto-switch's plan-capacity test for overflow while no rotator runs. |
|
AMPLIHACK_ROUTING_TEXT |
user preference | text.routing |
off leaves out the routing reminder, the session-start workflow section and the contract's router lines. See Switch off the routing text. |
AMPLIHACK_RUNTIME_DIR |
user preference | Worktree runtime directory override. | |
AMPLIHACK_RUNTIME_ROOT |
internal | Runtime root handed to recipe steps. | |
AMPLIHACK_RUN_DIR |
internal | Run folder <work root>/runs/<run id> handed to recipe steps. |
|
AMPLIHACK_RUN_ID |
internal | Id of one amplihack recipe run invocation, handed to recipe steps; names the run folder. Differs from AMPLIHACK_RECIPE_RUN_ID, which is the id of the current attempt. |
|
AMPLIHACK_RUN_GUIDANCE_DIRS |
internal | Guidance folders recipe run hands to its runner; the agent-step launcher adds their entries to each prompt. Removed by --detach, agent-binary --shell and test isolation. See amplihack recipe guide. |
|
AMPLIHACK_RUST_BINARY |
user preference | Binary for the Rust trial. | |
AMPLIHACK_RUST_RUNTIME |
internal | Marks a process launched by the Rust CLI. | |
AMPLIHACK_RUST_TRIAL_HOME |
user preference | Home for the Rust trial. | |
AMPLIHACK_SAFE_HEREDOC_V1_TMPWRITE |
test-only | Not an env var: heredoc delimiter in a recipe test. | |
AMPLIHACK_SAFE_HEREDOC_V2_TMPWRITE |
test-only | Not an env var: heredoc delimiter in a recipe test. | |
AMPLIHACK_SAFE_HEREDOC_V3_TMPWRITE |
test-only | Not an env var: heredoc delimiter in a recipe test. | |
AMPLIHACK_SEND_INPUT_ALLOWLIST |
user preference | Allowlist for sending input to sessions. | |
AMPLIHACK_SESSION_DEPTH |
internal | Session-tree depth exported to children. | |
AMPLIHACK_SESSION_ID |
internal | Session id exported to children. | |
AMPLIHACK_SESSION_NONCE |
internal | Random value each amplihack <cli> launch exports beside its session:<cli> tag, so a session can be told apart from a tmux server's copy of another session of the same CLI. |
|
AMPLIHACK_SESSION_TREE_DIR |
internal | Session-tree state directory. | |
AMPLIHACK_SIGNAL |
internal | Prefix of the AMPLIHACK_SIGNAL_* variables, named in help text. |
|
AMPLIHACK_SIGNAL_ACCOUNT |
user preference | Signal account. | |
AMPLIHACK_SIGNAL_ALLOWLIST |
user preference | Signal sender allowlist. | |
AMPLIHACK_SIGNAL_CONFIG |
user preference | Signal config file path. | |
AMPLIHACK_SIGNAL_ENDPOINT |
user preference | Signal endpoint. | |
AMPLIHACK_SIGNAL_INBOX_CAPACITY |
user preference | Signal inbox size. | |
AMPLIHACK_SIGNAL_OWN_DEVICE_ID |
user preference | Signal device id. | |
AMPLIHACK_SIGNAL_PORT |
user preference | Signal endpoint port. | |
AMPLIHACK_SIGNAL_REUSE_ROLLING_GROUP |
user preference | Opts in to a shared rolling group. | |
AMPLIHACK_SIGNAL_ROLLING_GROUP_ID |
user preference | Rolling group to reuse. | |
AMPLIHACK_SIGNAL_STATE_DIR |
user preference | Signal state directory for hooks. | |
AMPLIHACK_SKIP_AUTO_INSTALL |
user preference | Skips automatic framework install. | |
AMPLIHACK_SKIP_MMDC |
user preference | Skips installing the Mermaid CLI. | |
AMPLIHACK_SKIP_POWER_STEERING |
user preference | Skips the power-steering prompt. | |
AMPLIHACK_SKIP_RECIPE_RUNNER_INSTALL |
user preference | Skips installing the recipe runner. | |
AMPLIHACK_SKIP_REFLECTION |
user preference | Skips the stop-hook reflection. | |
AMPLIHACK_SKIP_UPDATE_CHECK |
test-only | Set only by Codex plugin install tests. | |
AMPLIHACK_SOURCE_ROOT |
test-only | Codex front-door contract fixture. | |
AMPLIHACK_STATUSLINE_NESTED |
internal | Set by the status-line wrapper for the command it runs, so an inner profile statusline runs only statusline.sh. |
|
AMPLIHACK_STEP_ID |
internal | Id of the recipe step, set by the recipe runner on every agent launch. When it is set and non-empty, the workflow classification reminder inserts no routing text, as for AMPLIHACK_RECIPE_RUN_ID. The pinned runner, 2833a0b, does not set it yet. See Prompts that are not a person's. |
|
AMPLIHACK_STEP_TIMEOUT |
user preference | recipe.step_timeout |
Per-step timeout ceiling exported to the recipe runner. |
AMPLIHACK_STUB |
test-only | Stub binary marker in recipe and remote tests. | |
AMPLIHACK_SUPPLIED |
internal | Not an env var: suffix of the OVERRIDE_IS_AMPLIHACK_SUPPLIED constant. |
|
AMPLIHACK_TARGET_LINK_ROOTS |
user preference | Colon-separated absolute folders where linked pre-commit targets may point; amplihack cleanup removes a linked target (destination and link) only inside these or the managed roots, or, for a link in the host cargo wrapper's layout (<folder>-<target name>-<12 hex>), inside the folder holding it. Unset by default; not needed for wrapper links. Read only by amplihack cleanup, never by the hook. See Linked targets. |
|
AMPLIHACK_TASK_DESCRIPTION |
user preference | Default task_description context for recipe run. |
|
AMPLIHACK_TEARDOWN_GRACE_SECS |
user preference | Grace period between SIGTERM and SIGKILL when tearing down the runner. | |
AMPLIHACK_TESTTOOL_BINARY_PATH |
test-only | binary_finder unit-test instance of AMPLIHACK_<TOOL>_BINARY_PATH. |
|
AMPLIHACK_TEST_1527_PROBE_ARGS |
test-only | #1527 launch-model test probe. | |
AMPLIHACK_TEST_1527_PROBE_BINARY |
test-only | #1527 launch-model test probe. | |
AMPLIHACK_TEST_BINARY |
test-only | Binary under test in contract tests. | |
AMPLIHACK_TEST_BOOL_UNSET_XYZ |
test-only | EnvVar unit test name. |
|
AMPLIHACK_TEST_DENIAL_PANIC |
test-only | Fault injection in the hook protocol test. | |
AMPLIHACK_TEST_DETACH_START_SECS |
test-only | Shortens how long recipe run --detach waits for the pane to start the run (default 15 s), so a test of a pane that never starts is quick. Other recipe run --detach tests set it to 600 so a loaded host cannot time out a pane that does start. |
|
AMPLIHACK_TEST_FAIL_ATTEMPT |
test-only | Read only in debug builds. The number of a supervised attempt that must fail to start, as a replaced binary, EMFILE or a refused output buffer would. Issue #2816 uses it to drive the path where the supervisor stands down after a prompt capture has been set up, so the plain launch that follows must inherit fd 0 whole. |
|
AMPLIHACK_TEST_FAIL_PROMPT_COPY |
test-only | Read only in debug builds. When set and not empty, setting up the copy of a supervised step's piped prompt fails as it does in a process out of file descriptors (EMFILE). Tests use it to check that such a step is not run at all, rather than run on a prompt no retry could be given: the real cause cannot be arranged from outside a test without starving the test of descriptors too. |
|
AMPLIHACK_TEST_FAKE_LATEST_VERSION |
test-only | Fakes the latest release for update tests. | |
AMPLIHACK_TEST_HOME_GUARD |
test-only | Set only by the test helper tests/support/isolated_amplihack.rs on each amplihack a test starts; the user-config loader then ignores a HOME outside the temp dir, so no test reads or migrates a real ~/.amplihack. When it is set and not empty, a launch also skips rotator autostart before any other check, so no test starts a real profile rotate watch --spawned daemon; see Keep Tests from Leaking Rotator Daemons. |
|
AMPLIHACK_TEST_AGENT_CHILD_TIMEOUT_SECS |
test-only | Read only in debug builds. Whole seconds, 1..=3600; any other value gives the 10 s CHILD_TIMEOUT. Raises the time each tmux, systemd-run and git call of amplihack agent may take. The issue_1760 test fixture sets it to 600; see Keep Tests Passing Under Host Load. |
|
AMPLIHACK_TEST_IDENTITY_BUDGET_SECS |
test-only | Read only in debug builds. Whole seconds, 1..=3600; any other value gives the 30 s IDENTITY_BUDGET. Raises the total time a rotate cycle may spend on account identity reads, so a loaded host does not use it up. The rotate test fixture sets it to 600; see Keep Tests Passing Under Host Load. |
|
AMPLIHACK_TEST_IDENTITY_READ_TIMEOUT_SECS |
test-only | Read only in debug builds. Whole seconds, 1..=3600; any other value gives the 5 s IDENTITY_READ_TIMEOUT. Raises the time one identity read may take. The rotate test fixture sets it to 600. |
|
AMPLIHACK_TEST_MISSING_NO_DEFAULT |
test-only | EnvVar unit test name. |
|
AMPLIHACK_TEST_NONEXISTENT_123 |
test-only | EnvVar unit test name. |
|
AMPLIHACK_TEST_NONEXISTENT_456 |
test-only | EnvVar unit test name. |
|
AMPLIHACK_TEST_NONEXISTENT_789 |
test-only | EnvVar unit test name. |
|
AMPLIHACK_TEST_LOGIN_EXCHANGE |
test-only | Read only in debug builds, by profile rotate and profile switch. Exactly renames, together with a non-empty AMPLIHACK_TEST_HOME_GUARD, replaces the atomic exchange of two login files with a stand-in made of three plain renames, so rotation tests that start the binary run the same way on every system; any other value leaves the host's exchange in place. The stand-in is not atomic, and it moves a file only when both files lie inside the temp dir, where a test's logins are: for any other pair it moves nothing, prints one line on stderr that names the file, and the swap fails with exchange failed: permission denied. A debug build that carries both variables by mistake therefore cannot move a login under a home folder or a profile root. Release builds do not contain the stand-in, and on every system but Linux they decline the exchange with atomic exchange is not supported here. The rotation fixtures set it (LOGIN_EXCHANGE_ENV). Do not set it in a shell. |
|
AMPLIHACK_TEST_NONEXISTENT_GET_ERR |
test-only | EnvVar unit test name. |
|
AMPLIHACK_TEST_PROBE_WAIT |
test-only | Read only in debug builds, by amplihack_utils::launch_target. Exactly exit makes the --version probe of each launch candidate wait for the candidate to exit instead of the 3 s per-candidate and 10 s total limits; any other value leaves the limits in place. isolated(..) sets it on every test child. Do not set it in a shell: it removes the probe bound, so a candidate that hangs on --version hangs the launch; see Keep Tests Passing Under Host Load. |
|
AMPLIHACK_TEST_PROC_ROOT |
test-only | Names a fake process table that procfs::proc_root() reads in place of /proc. Unlike the debug-only knobs above, it is honoured in release builds too (accepted risk SR-2), but only when AMPLIHACK_TEST_HOME_GUARD is set and the path is a private directory owned by this user inside the temp dir; otherwise /proc is read, and a debug build prints one stderr line naming the reason (AMPLIHACK_TEST_PROC_ROOT ignored (...)). rotate stop checks the pid it signals against the real /proc whatever this names. isolated(..) sets it to a shared empty tree (PROC_ROOT_ENV), so no amplihack profile, sessions or cleanup test reads the host's processes; see Keep Tests off the Host Process Table. |
|
AMPLIHACK_TEST_REQUIRE_STRACE |
test-only | When non-empty, the issue_2042_host_proc_strace tests fail if strace is not installed instead of skipping. CI sets it. |
|
AMPLIHACK_TEST_ROOT_SANDBOX_PROBE |
test-only | Root-sandbox spawn test probe. | |
AMPLIHACK_TEST_ROTATOR_LIFETIME_FD |
test-only | Set only by the profile_rotate test fixture to the fd number of the read end of a pipe whose write end the test process holds. A rotator watcher reads it only when AMPLIHACK_TEST_HOME_GUARD is 1, the value, read without trimming, is an integer of at least 3, and the fd is an inherited FIFO with FD_CLOEXEC clear; on EOF it stops as on SIGTERM. Otherwise it is ignored silently. See How a Test's Rotator Ends with Its Test. |
|
AMPLIHACK_TEST_SECURITY_MODE |
test-only | Hook protocol test mode. | |
AMPLIHACK_TEST_SECURITY_TRANSPORT |
test-only | Hook protocol test transport. | |
AMPLIHACK_TEST_VAR_12345 |
test-only | Not an env var: suffix of a uvx-manager test marker. | |
AMPLIHACK_TIMEOUT |
internal | Not read: example name in amplihack-state EnvVar docs. |
|
AMPLIHACK_TOPIC_NAME |
user preference | Hive topic name. | |
AMPLIHACK_TRACE_FILE |
user preference | Trace log file. | |
AMPLIHACK_TRACE_LOGGING |
user preference | Enables trace logging. | |
AMPLIHACK_TREE_ID |
internal | Session-tree id exported to children. | |
AMPLIHACK_TURN_ERROR_TAIL_BYTES |
user preference | Bytes of output kept in a turn error. | |
AMPLIHACK_UNDER_TEST |
test-only | Marks integration-test child processes. | |
AMPLIHACK_USE_DOCKER |
user preference | Runs the agent in amplihack's container. | |
AMPLIHACK_USE_RECIPES |
user preference | Lets the cascade workflow use recipes. | |
AMPLIHACK_VERSION |
internal | Version exported to children. | |
AMPLIHACK_WORKFLOW_ARTIFACT_DIR |
internal | Artifact directory handed to recipe steps. | |
AMPLIHACK_WORKFLOW_RUNTIME_DIR |
internal | Runtime directory <run dir>/runtime handed to recipe steps. |
|
AMPLIHACK_WORKSPACE_MARKER |
internal | Not an env var: the install clone's workspace marker constant. | |
AMPLIHACK_WORKSTREAM |
user preference | Workstream identity for the capacity governor's fair queue. | |
AMPLIHACK_WORKSTREAM_ISSUE |
internal | Issue number handed to a multitask workstream. The capacity governor also uses it as the workstream ws-<n>. |
|
AMPLIHACK_WORKSTREAM_PROGRESS_FILE |
internal | Progress file handed to a multitask workstream. | |
AMPLIHACK_WORKSTREAM_STATE_FILE |
internal | State file handed to a multitask workstream. | |
AMPLIHACK_WORKTREE_LOCK_FILE |
user preference | Path of a host lock file. When set, the worktree setup steps hold a blocking shared flock on it while they create or reuse a worktree. Linux only. Read by bundle tools, not by crates/. See Optional lock while a worktree is set up. |
|
AMPLIHACK_WORKTREE_PATH |
internal | Worktree path handed to a multitask workstream. | |
AMPLIHACK_WORK_ROOT |
user preference | Folder for run folders, targets, clones and the log archive; default $HOME/.amplihack/work. When set by the caller (see AMPLIHACK_WORK_ROOT_EXPLICIT), worktrees also go under it. Clones are never cleaned up. See Clean Up After Recipe Runs. |
|
AMPLIHACK_WORK_ROOT_EXPLICIT |
internal | Handed to recipe steps; decides whether worktrees move under the work root. Passed through unchanged when already set, so a nested run keeps its parent's value; otherwise 1 when AMPLIHACK_WORK_ROOT is set and 0 when not. |
Variables outside the AMPLIHACK_* namespace¶
The grep above lists only AMPLIHACK_* names. amplihack also reads
INVOCATION_ID, which systemd sets for the processes of a unit. When it is
set and non-empty, and the last component of the process's
/proc/self/cgroup path is a .service unit other than
user@<uid>.service, amplihack profile rotate watch records itself as the
rotation owner, and launches stop starting
a rotator of their own. A change: line in the rotate log records it as
invocation=<id>. rotate start and launches that start the rotator remove
it from the rotator's environment. Do not set it by hand.
amplihack profile usage also reads two Codex variables:
| Name | Category | Note |
|---|---|---|
CODEX_PROFILES_ROOT |
user preference | Directory whose subdirectories are the Codex accounts listed by amplihack profile usage; default $HOME/.codex-profiles. The same variable codex-pick reads. See Codex accounts. |
CODEX_BIN |
user preference | The Codex program amplihack profile usage runs as <bin> app-server for each account; default codex, found through PATH. Like PATH, it decides which program runs, so set it only to a program you trust. See Live read. |
amplihack sets CODEX_HOME only in the environment of the Codex app server
it starts, to the account directory, and removes OPENAI_API_KEY,
CODEX_API_KEY and RUST_LOG from that child's environment. Its own
environment is not changed.
Related¶
- User Configuration — The config files, their keys and the
amplihack configcommand - Environment Variables — Detailed behaviour of the variables amplihack sets and reads
- Model Tiers:
AMPLIHACK_FORCE_MODEL, whereAMPLIHACK_DEFAULT_MODELandAMPLIHACK_LITELLM_MODELsit relative to a step's tier, and themodel-tiers.jsonlrecord written underAMPLIHACK_RUN_DIR