Skip to content
AnvilACP runtime

Configuration and CLI

Anvil separates configuration by ownership and lifetime. This prevents an editor’s per-session choice from silently becoming an installation-wide default.

Provider credentials and discovery settings are shared by sessions in an Anvil installation. Use /setup inside a session to configure them; see Model Providers and Setup.

The ACP client owns current-session controls such as model selection, behavior mode, permission mode, reasoning effort, and service tier. Clients must send these values for each new or loaded session. Anvil does not write them to setup state or session manifests as user preferences.

Sandbox behavior and automatic turn recaps are persisted as installation defaults and seed future sessions. --transient-setup keeps sandbox, recap, and first-run changes process-local, but provider credentials, allowed_tools, and MCP configuration remain persistent.

setup.json accepts an optional allowed_tools array of exact model-callable tool names. It is applied after built-in, MCP, and dynamic tools such as activate_skill and task are assembled.

{
"allowed_tools": ["read_file", "grep_search", "search_symbols", "task"]
}

Unknown names are ignored. Omitting the field exposes the full assembled catalog; an empty list exposes no model-callable tools.

anvil [OPTIONS]
FlagEnvironment variableDefaultMeaning
--default-modelunsetDefault wire id or bare provider model id for new sessions.
--reasoning-effortprovider defaultSeed new sessions with a supported reasoning effort, or off.
--max-turns0Prompt tool-loop ceiling; 0 is unbounded.
--asgard-modelunsetRepeatable provider-qualified candidate model, up to five ordered lanes.
--asgard-supervisorsession modelSupervisor model used when Asgard candidates are configured.
--asgard-window-steps8Deprecated compatibility flag; the supervisor now chooses window length.
--max-sessions50Resident-session LRU limit; 0 disables it.
--max-history-turns50In-memory history-turn limit; 0 disables it.
--llm-idle-timeout-secsANVIL_LLM_IDLE_TIMEOUT_SECS300Wait for first meaningful stream progress.
--llm-stall-timeout-secsANVIL_LLM_STALL_TIMEOUT_SECS60Allowed gap after streaming begins.
--transient-setupANVIL_TRANSIENT_SETUPfalseKeep selected installation defaults process-local.
--no-wasm-sandboxANVIL_NO_WASM_SANDBOXfalseDisable the Wasmtime parser/search fallback; without an OS sandbox, shell commands then have no execution sandbox.

ANVIL_TRACE_JSONL=<path> writes diagnostic LLM and step events to a local JSONL trace. Treat it as sensitive: prompts, responses, and operational metadata can contain project information.

Run anvil --help for the exact flags supported by the installed version.

Provider integrations may reuse external credential stores or save credentials through Anvil’s secret/setup mechanisms. Prefer elicitation forms such as /setup codex or /setup openrouter; a key pasted directly into chat becomes session content. See Data and Trust Boundaries.