rtk-ai/rtk · error

OMP extension at was not changed; remove or back up the…

Error message

OMP extension at {} was not changed; remove or back up the file manually before retrying.

What it means

Same guard as the Pi flow but for the OMP extension install/patch path: if the existing OMP extension file fails `validate_stock_pi_plugin_path` (policy declined or only previewed) and this is not a dry run, rtk bails rather than overwriting an unvalidated file. The file must be removed or backed up manually before retrying.

Solutions

  1. Rerun with `rtk init --auto-patch` to let rtk replace the existing OMP extension file.
  2. Back up and remove the file manually (`mv <path> <path>.bak`), then rerun `rtk init`.
  3. Preview first with `rtk init --auto-patch --dry-run` to see exactly what will change.
  4. Point rtk at a different extension path if the current file must be preserved.

Example fix

// before (shell)
rtk init   # OMP extension not changed
// after (shell)
mv ~/.omp/extensions/rtk.ts ~/.omp/extensions/rtk.ts.bak && rtk init --auto-patch
Defensive patterns

Strategy: fallback

Validate before calling

f=~/.omp/extensions/rtk.ts
if [ -f "$f" ]; then echo "$f exists — use --auto-patch or remove it before rtk init"; fi

Try / catch

rtk init || { mv <path> <path>.bak && rtk init --auto-patch; }

Prevention

When it happens

Trigger: Running `rtk init` OMP install/patch mode where the target extension file exists, validation returns false (stock/unrecognized content declined by patch_mode), and dry_run is false.

Common situations: Scripted run without `--auto-patch`; user declined the prompt; a stock extension from another install occupies the OMP extension path.

Understand the failure class

Background: Conflicting config options: "cannot be used together" — configuration validation errors across open-source libraries — this error's family across 162 libraries.

Related errors


AI-assisted analysis of rtk-ai/rtk@0924356b4c (2026-09-19). Data as JSON: /api/errors/72ab100f850babef. Report an issue: GitHub.

Appendix: source

Thrown at src/hooks/init.rs:4614

/// Install the shared Pi extension file for OMP with an explicit
/// confirmation policy for an existing non-stock file.
pub fn run_omp_mode_with_patch_mode(
    global: bool,
    patch_mode: PatchMode,
    ctx: InitContext,
) -> Result<()> {
    let InitContext { dry_run, .. } = ctx;
    let path = omp_extension_path_for_scope(global)?;
    let extension_was_present = path.exists();

    warn_if_extension_shared_on_install(global, &path, PiCompatibleAgent::Omp)?;

    if !validate_stock_pi_plugin_path(&path, "OMP extension", patch_mode, ctx)? {
        if dry_run {
            print_dry_run_footer();
            return Ok(());
        }
        anyhow::bail!(
            "OMP extension at {} was not changed; remove or back up the file manually before retrying.",
            path.display()
        );
    }

    if let Some(parent) = path.parent() {
        ensure_pi_extensions_dir(
            parent,
            if global {
                "OMP extensions directory"
            } else {
                "local OMP extensions directory"
            },
            ctx,
        )?;
    }

    let installed =

View on GitHub (pinned to 0924356b4c)