rtk-ai/rtk · error
Pi extension at contains RTK content that does not match…
Error message
Pi extension at {} contains RTK content that does not match the stock extension. Remove the file manually. What it means
When uninstalling the Pi extension, rtk detects that the existing extension file contains RTK markers but its content does not match the current stock extension shipped with this rtk version (user customization or a stale/older RTK version). Because auto-deleting it could destroy user edits, rtk bails and asks the user to remove the file manually.
Solutions
- Inspect the file, and if it is disposable or you saved your edits, delete it manually (`rm <path>`), then rerun `rtk init`.
- Back up your customizations first (`cp <path> <path>.bak`) and then remove the file.
- Re-generate the extension fresh with `rtk init` and reapply only the customizations you still need.
Example fix
// before (shell) rtk init # refuses: content does not match stock extension // after (shell) cp ~/.pi/extensions/rtk.ts ~/.pi/extensions/rtk.ts.bak && rm ~/.pi/extensions/rtk.ts && rtk init
Defensive patterns
Strategy: fallback
Validate before calling
f=~/.pi/extensions/rtk.ts if [ -f "$f" ] && grep -q RTK "$f"; then echo "$f contains RTK content — back up or delete manually before rtk init" fi
Try / catch
rtk init || { cp <path> <path>.bak && rm <path> && rtk init; } Prevention
- Do not hand-edit generated extension files; keep customizations in a separate overlay.
- Back up agent extension files before upgrading rtk.
- Diff existing extension content against the freshly generated one after upgrades.
When it happens
Trigger: Running `rtk init` (Pi uninstall/removal flow) where the plugin file at plugin_path contains RTK-identifying content but a hash/content comparison against the stock extension fails.
Common situations: User edited the generated rtk.ts extension; rtk was upgraded and the old extension format no longer matches; a fork or pinned older rtk version wrote the file.
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
- OMP extension at contains RTK content that does not match…
- OMP extension at was not changed; remove or back up the…
- Pi extension at was not changed; remove or back up the file…
- at could not be read; leaving it alone.
- Shared Pi/OMP extension at
AI-assisted analysis of rtk-ai/rtk@0924356b4c (2026-09-19).
Data as JSON: /api/errors/41bc19bf5261d043.
Report an issue: GitHub.
Appendix: source
Thrown at src/hooks/init.rs:4367
return Ok(());
}
let ownership_state_path = shared_agent_state_path(&plugin_path);
let Some(content) = read_extension_for_uninstall(&plugin_path, "Pi extension", ctx)? else {
return Ok(());
};
if !is_known_stock_pi_plugin(&content) {
if looks_like_rtk_pi_plugin(&content) {
if dry_run {
println!(
"[dry-run] would refuse to remove Pi extension: {}",
plugin_path.display()
);
print_dry_run_footer();
return Ok(());
}
anyhow::bail!(
"Pi extension at {} contains RTK content that does not match the stock extension. Remove the file manually.",
plugin_path.display()
);
}
println!(
"Pi extension at {} is not RTK content; leaving it alone.",
plugin_path.display()
);
if dry_run {
print_dry_run_footer();
}
return Ok(());
}
if !confirm_shared_extension_uninstall(
global,
&plugin_path,
PiCompatibleAgent::Pi,View on GitHub (pinned to 0924356b4c)