Skip to content

Environment variables

Every variable below is named in the docs or read by the code; the last column says where. Unset means the default.

Variable Default Effect Documented in
REMATCH_ROOT ~/.rematch root of all rematch state; shared by every omp profile; one root per environment (home and work are separate libraries) DESIGN §1
REMATCH on REMATCH=0: off for one process (the extension registers only the rematch tool and /rematch; the binary refuses reflect and stage) DESIGN §1
REMATCH_BIN checkout target/release/rematch → target/debug/rematch → PATH binary used by the live harness adapters adapter READMEs
OMP_BIN omp on PATH omp backend for editor, classifier and batch rollouts; adapters use availability to decide whether to start reflection DESIGN §14, §18
REMATCH_MACHINE the host name this machine’s name in the lake and the profile; fixed in the ledger at first use DESIGN §13, §20
REMATCH_BELLWETHER bellwether on PATH the Bellwether binary for lake index / lake query (--bellwether wins) DESIGN §19.2
REMATCH_NO_LAKE 0 1: scripts/install.sh (or install.ps1) builds with --no-default-features (no lake) scripts/install.sh
REMATCH_IMPROVER embedded files a directory to take the improver files from DESIGN §14
REMATCH_EDITOR_TIMEOUT 180 s seconds per model call not in the docs: crates/rematch/src/editor.rs (default: DESIGN §9)
CLAUDE_BIN claude on PATH the Claude Code binary doctor runs claude plugin validate with DESIGN §2
LAUNCHCTL_BIN launchctl the launchctl doctor checks the profile’s launchd job with DESIGN §2
OMP_PLUGINS_DIR <config root>/plugins where doctor and improve look for omp plugins not in the docs: crates/rematch/src/{doctor,improve}.rs

rematch resolves the omp agent dir exactly as omp does. ~/.rematch stays shared unless REMATCH_ROOT is set (DESIGN §0, §1).

Variable Effect
PI_CONFIG_DIR replaces ~/.omp as the config root
OMP_PROFILE selects <config root>/profiles/<name>/agent; when defined, even empty or default, it suppresses PI_PROFILE
PI_PROFILE the same, when OMP_PROFILE is not defined
PI_CODING_AGENT_DIR the agent dir in the default profile (ignored for a named profile)
Variable Effect Documented in
CLAUDE_PLUGIN_ROOT the Claude Code plugin dir skills sync --harness claude-code links and copies into; else <CLAUDE_CONFIG_DIR or ~/.claude>/skills/rematch DESIGN §2, §18.1
CLAUDE_CONFIG_DIR relocates ~/.claude (transcripts for import --history --harness claude-code) DESIGN §18.1
CLAUDE_CODE_SESSIONEND_HOOKS_TIMEOUT_MS raises Claude Code’s 1.5 s SessionEnd budget (e.g. 5000) Claude Code README
CODEX_HOME Codex’s home (default ~/.codex); history is read from $CODEX_HOME/sessions DESIGN §18.2.1
PI_BIN overrides the Pi binary inspected by doctor doctor.rs
REMATCH_PI_AGENT_DIR explicit Pi input/config location for Rematch; normally passed by the Pi adapter, else ~/.pi/agent Pi API notes
REMATCH_PI_SESSION_DIR explicit Pi history directory; wins over PI_CODING_AGENT_SESSION_DIR Pi API notes
PI_CODING_AGENT_SESSION_DIR Pi history override when it does not point inside omp’s config root import_pi.rs
OPENCODE_DB absolute store path or filename under OpenCode’s data dir; default opencode.db OpenCode API notes
XDG_DATA_HOME OpenCode history under <value>/opencode; default ~/.local/share/opencode OpenCode API notes
XDG_CONFIG_HOME OpenCode global config under <value>/opencode; default ~/.config/opencode OpenCode API notes

The Pi adapter removes Pi’s PI_CODING_AGENT_DIR and session-dir override from its Rematch child processes, passing their input locations through REMATCH_PI_* instead. Pi’s configuration must not become the omp backend’s configuration.

Variable Set for Documented in
PI_OFFLINE=1, PI_SKIP_VERSION_CHECK=1, PI_TELEMETRY=0 every omp the binary runs DESIGN §9, §14
REMATCH=0, REMATCH_SEED batch rollouts DESIGN §17
REMATCH_TASK, REMATCH_WORKTREE, REMATCH_REPO batch verifiers DESIGN §17
REMATCH_JOB_ID detached jobs (stripped from their children) DESIGN §14
REMATCH_ROLE, REMATCH_PROMPT a scripted --editor <cmd> (tests) DESIGN §14