Install
Install the binary, connect your harness, and check the connection.
One binary, ledger and library serve every harness; an adapter only forwards what its harness exposes. omp is the reference. What each harness can and cannot do: harness capabilities.
Install
Section titled “Install”You need omp 18.12 and a Rust toolchain, in a checkout of this repo.
-
Build and link:
scripts/install.shIt builds the binary, links the extension into omp, and writes the shim
~/.local/bin/rematch. -
Check:
rematch doctor --textThe last line reads
ready: true. Anything else is listed as aproblem:line saying what to run.
You need Claude Code 2.1.285 or later and the rematch binary: cargo build --release in this repo, rematch on PATH, or REMATCH_BIN set.
-
Load the plugin in every session:
ln -s /path/to/rematch/adapters/claude-code ~/.claude/skills/rematchOr for one session only:
claude --plugin-dir /path/to/rematch/adapters/claude-code -
Check the load:
claude --plugin-dir /path/to/rematch/adapters/claude-code plugin details rematchExpect 8 hooks; under Skills, the eight commands plus every linked skill; under Agents, the rematch subagents.
Reflection makes its model calls through omp (OMP_BIN, else omp on PATH). Without omp, sessions are still traced, flagged and loaded; run rematch reflect --pending where omp is installed.
If large sessions end unflagged, raise the 1.5 s SessionEnd budget:
CLAUDE_CODE_SESSIONEND_HOOKS_TIMEOUT_MS=5000 claudeUse Pi 1.4.x (@earendil-works/pi-coding-agent) and Node 22.19 or newer. Keep this checkout available: the adapter imports Rematch’s shared helpers from it.
-
Build Rematch and put its binary on your shell’s path:
cargo build --releaseexport PATH="$PWD/target/release:$PATH" -
Install the local Pi package:
pi install "$PWD/adapters/pi"For one session instead:
pi -e "$PWD/adapters/pi" -
Start Pi and check:
/rematch status
Pi discovers ~/.rematch/skills through its native resource-discovery hook. Tracing and approved runtime hooks run in Pi; background reflection still needs omp with configured model access.
Remove the package with pi remove /path/to/rematch/adapters/pi. See the adapter notes for session resume behavior and limits.
Use OpenCode 1.19.4 and a local Rematch checkout. OpenCode 2 is not a tested target.
-
Build the Rematch binary:
cargo build --releaseexport PATH="$PWD/target/release:$PATH" -
Add this entry to the existing
pluginarray in your global~/.config/opencode/opencode.json, or a project’sopencode.json:{"plugin": ["/path/to/rematch/adapters/opencode"]}Merge it with your existing configuration; do not replace other plugins.
-
Start OpenCode and check:
/rematch-status
The plugin adds Rematch’s shared directory to OpenCode’s in-memory skill paths. It traces main sessions, runs approved hooks, and provides user commands for approvals. Reflection still needs omp with configured model access.
See the OpenCode adapter for supported hooks, session boundaries and history import.
You need rematch on PATH (scripts/install.sh, or cargo build --release). The omp plugin is not required. Nothing runs inside a Codex session; rematch reads its sessions afterwards.
-
Let Codex see rematch’s skills (once):
mkdir -p ~/.agents/skillsln -s ~/.rematch/skills ~/.agents/skills/rematch -
Before starting Codex in a repo, add the skills that match it:
rematch skills sync --harness codex --cwd "$PWD"To do it on every launch, add this to your shell rc:
codex() { rematch skills sync --harness codex --cwd "$PWD" >/dev/null; command codex "$@"; } -
After you worked, import and reflect:
rematch import --history --harness codexrematch reflect --historyA session that was never imported never counts.
-
Optional: digest, sync and approvals from inside Codex, each command after your approval:
ln -s "$PWD/adapters/codex/skills/rematch-status" ~/.agents/skills/rematch-status
Choose the models (optional)
Section titled “Choose the models (optional)”The editor should be the strongest model you have, the classifier a fast one. Set them in ~/.omp/agent/config.yml:
modelRoles: rematch-editor: <provider>/<strongest model> # falls back to slow → default rematch-classifier: <provider>/<fast model> # falls back to smol → tiny → defaultrematch doctor --text shows which models it resolved. Per-machine roles: model roles.
Seed from your history (optional)
Section titled “Seed from your history (optional)”Import the sessions you already have, then reflect on the ones that carried a correction. Import is read-only and makes no model call.
rematch import --historyrematch reflect --historyimport --historyreads available omp, Claude Code, Codex, Pi and OpenCode history. Use--harness omp|claude-code|codex|pi|opencodeto select one, or--skip-profile <name>to exclude an omp profile. Each adapter documents its history location and environment overrides.reflect --historyhandles the newest 10 flagged sessions per run (--limit,--since 2026-10-01). Run it again for the next batch; a session is reflected once.- Each reflection follows the same rules as a live one: same rate limits, at most 3 model calls.