Configuration Reference

Copy Markdown View Source

Prompt Runner now has two configuration styles:

  • convention mode via API/CLI options
  • explicit legacy config via runner_config.exs

Convention Mode Options

These are the options used by PromptRunner.plan/2, run/2, run_prompt/2, and mix prompt_runner ....

OptionTypeMeaning
targetstring or repeatedRepo path or name:path target
targetsmap or listNamed target repo map for API use
provideratom/string:claude, :codex, or :amp
modelstringModel name
interfaceatom:api or :cli
state_dirstringOverride the CLI runtime state directory
no_statebooleanDisable persisted runtime state
runtime_storeatom/stringOverride runtime store selection
committeratom/stringOverride committer selection
log_modeatom/string:compact, :verbose, or :studio
log_metaatom/string:none or :full
events_modeatom/string:compact, :full, or :off
tool_outputatom/string:summary, :preview, or :full
on_eventfunctionGlobal observer callback
on_prompt_startedfunctionLifecycle callback
on_prompt_completedfunctionLifecycle callback
on_prompt_failedfunctionLifecycle callback
on_run_completedfunctionLifecycle callback

Convention Metadata

Convention prompts support:

  • front matter keys: num, phase, sp, targets, commit, validation
  • heading fallbacks: #, ## Mission, ## Validation Commands, ## Repository Root

See Convention Mode for examples.

Legacy Config

runner_config.exs is still loaded through PromptRunner.Config.load/1.

%{
  project_dir: "/path/to/repo",
  prompts_file: "prompts.txt",
  commit_messages_file: "commit-messages.txt",
  progress_file: ".progress",
  log_dir: "logs",
  model: "haiku",
  llm: %{
    provider: "claude",
    prompt_overrides: %{
      "02" => %{provider: "codex", model: "gpt-5.3-codex"}
    }
  }
}

Required Legacy Fields

FieldMeaning
project_dirDefault working directory
prompts_filePrompt manifest
commit_messages_fileCommit message source
progress_fileProgress log
log_dirSession logs
modelDefault model

Legacy llm Fields

FieldMeaning
providerProvider alias
modelOptional override of root model
allowed_toolsTool restriction list
permission_modeProvider permission policy
adapter_optsAdapter-specific options
claude_optsClaude-specific options
codex_optsCodex-specific options
codex_thread_optsCodex thread options
cli_confirmationCodex CLI confirmation policy
timeoutTimeout override
prompt_overridesPer-prompt LLM overrides

Important Layering Notes

These fields do not all mean the same thing or apply at the same layer.

  • allowed_tools
    • Prompt Runner level tool allowlist passed through to the selected adapter.
  • permission_mode
    • Prompt Runner's shared provider-facing permission knob.
    • This is normalized here and then interpreted by the provider adapter or downstream runtime.
    • Use the shared normalized values: :default, :auto, :bypass, or :plan.
    • Codex currently only accepts :default, :bypass, or :plan through this shared surface. Prompt Runner rejects Codex :auto during config loading.
  • codex_thread_opts
    • Codex-only thread/session options forwarded through the current ASM Codex surface.
    • This is where Codex-specific knobs such as reasoning_effort, additional_directories, skip_git_repo_check, and output_schema belong.
    • Do not place raw Codex CLI flags such as sandbox or ask_for_approval here. Those are not part of the current ASM Codex option contract.
  • cli_confirmation
    • Codex-only runner audit policy.
    • This checks whether the configured Codex model and reasoning settings were actually confirmed by the CLI.
    • Prompt Runner accepts either hidden confirmation metadata or the launched run_started command args as the confirmation source.

Practical rule:

  • use permission_mode when you want one runner-level approval/edit posture that can map onto multiple providers
  • use codex_thread_opts when you need a real Codex thread option that does not exist as a shared provider knob

Multi-Repo Legacy Fields

FieldMeaning
target_reposNamed repo definitions
repo_groupsNamed repo groups for @group expansion

Defaults By Interface

InterfaceRuntime StoreCommitter
APImemorynoop
CLIfilegit
Legacy configexplicit filesgit

Environment and Global Config

Convention mode also reads:

  • PROMPT_RUNNER_MODEL
  • PROMPT_RUNNER_PROVIDER
  • ~/.config/prompt_runner/config.exs if it exists

CLI/API options win over those defaults.

Prompt Runner now forwards recovery-relevant provider options through the current ASM stack instead of keeping a legacy adapter-specific option surface.

  • Claude supports system_prompt, append_system_prompt, and max_turns
  • Codex supports system_prompt via the underlying thread base-instructions surface
  • Gemini supports system_prompt
  • Amp does not advertise system_prompt, append_system_prompt, or max_turns, and Prompt Runner now rejects those unsupported inputs instead of silently dropping them

On recoverable runtime failures, Prompt Runner will attempt an exact provider-session resume with Continue before it gives up on the run.