Installation Troubleshooting¶
Solutions for installation and update issues including recovery procedures.
Automatic Recovery¶
How Rollback Works¶
When an installation fails, rp1 automatically:
- Detects the failure
- Locates the backup created before installation started
- Restores all backed-up files to their original locations
- Deletes the backup manifest to prevent duplicate restoration
- Reports what was restored
Example output:
Error: Failed to copy plugin files (permission denied)
Installation failed. Restored previous installation (15 files). You can safely retry the installation.
What Gets Backed Up¶
Before any installation modification, rp1 backs up:
- All existing
rp1-*agent files in the agents folder - All existing
rp1-*skill directories - All existing
rp1-*plugin hook directories - The
opencode.jsonconfiguration (if present)
Backup Location¶
Backups are stored in a timestamped directory:
~/.opencode-rp1-backups/backup_{timestamp}/
├── manifest.json
├── agents/
│ └── rp1-base-*.md
│ └── rp1-dev-*.md
├── skills/
│ └── rp1-base/
│ └── rp1-dev/
├── plugin/
│ └── rp1-base-hooks/
└── opencode.json
Signal Interruption Recovery¶
Safe Cancellation¶
You can safely interrupt installation with Ctrl+C. The system handles this gracefully:
- Signal caught - Installation stops immediately
- Cleanup initiated - Partial files are removed
- Backup restored - Previous installation is restored (if backup exists)
- Guidance displayed - Instructions for retrying
Example output when interrupted:
^C
Installation interrupted. Cleaning up...
Restored previous installation from backup.
To retry: rp1 install claude-code
What Happens During Interruption¶
| Phase Interrupted | Recovery Action |
|---|---|
| Before file copy | No action needed (nothing changed) |
| During file copy | Partial files removed, backup restored |
| During plugin registration | Plugin unregistered, backup restored |
| After completion | No recovery needed (installation complete) |
CI/CD SIGTERM Handling¶
In CI environments, graceful shutdown via SIGTERM is handled identically to SIGINT (Ctrl+C). Your pipelines can safely cancel jobs without leaving broken state.
Common Issues¶
Installation Fails with Permission Denied¶
Cannot write to plugin directory
Symptoms:
- Error:
EACCES: permission denied - Installation aborts with file system error
Solutions:
-
Check directory ownership:
-
Fix permissions:
-
If using brew-installed Claude:
The plugin directory may be owned by root. Contact Claude Code support.
Partial Installation State¶
Some commands work, others don't
Symptoms:
/rp1-base:*commands work but/rp1-dev:*don't (or vice versa)- Some agents available, others missing
This shouldn't happen with the atomic installation feature. If you see this:
-
Check if atomic installation is enabled:
For OpenCode, plugins install atomically via staging directory. For Claude Code, plugins are registered one at a time.
-
Force reinstall:
-
Report the issue:
This indicates a bug. Please report with steps to reproduce.
Backup Not Found¶
Rollback failed: no backup available
Symptoms:
- Installation fails but no previous state to restore
- Message: "Installation failed. No previous installation to restore."
This is expected on first installation. There's nothing to roll back to.
Solutions:
- Fix the underlying error (network, permissions, etc.)
- Retry installation
-
For clean state, manually remove any partial files:
Staging Directory Cleanup¶
Orphaned staging directory
Symptoms:
- Directory exists at
~/.config/.rp1-staging/ - Happened after crash or power loss
Solutions:
-
Safe to delete:
The staging directory is only used during installation. If installation completed or was interrupted, this directory can be safely removed.
-
Retry installation:
After cleanup, retry:
Strict Mode¶
Using Strict Mode¶
Strict mode (--strict) converts warnings to errors. Use it in CI/CD for deterministic behavior:
Exit Codes¶
| Code | Meaning |
|---|---|
0 |
Success |
1 |
General error |
5 |
Strict mode failure (missing source directory) |
Example CI Configuration¶
# GitHub Actions
- name: Install rp1 plugins
run: rp1 install all --strict --yes
continue-on-error: false
# The step fails immediately if any source directory is missing
# rather than silently skipping it
Dry Run Validation¶
What Dry Run Checks¶
When you run rp1 install --dry-run, the system validates:
| Check | Description |
|---|---|
| Network connectivity | Can reach GitHub API |
| Disk space | Sufficient space for installation |
| Package manager | brew doctor passes (macOS/Linux) |
| Target version | Fetches exact version to install |
Example Output¶
$ rp1 install claude-code --dry-run
[DRY RUN] Would install:
- rp1-base to Claude Code
- rp1-dev to Claude Code
Validating prerequisites...
Network connectivity: OK
Disk space: OK (150 MB available)
Package manager: OK (brew doctor passed)
Latest version: 0.3.1
All prerequisites satisfied. Run without --dry-run to proceed.
Dry Run Failures¶
If validation fails, you'll see specific guidance:
$ rp1 install claude-code --dry-run
Validating prerequisites...
Network connectivity: FAILED
Cannot reach api.github.com
Check your network connection or proxy settings
Disk space: OK (150 MB available)
Prerequisites validation failed. Fix the issues above before installation.
Related¶
- install Reference - Full command documentation
- update Reference - Update command documentation
- General Troubleshooting - Other common issues