paperclipai/paperclip · error
No managed install was found to roll back.
Error message
No managed install was found to roll back.
What it means
Thrown by rollbackManagedInstall when readInstallManifest returns null — i.e. there is no install manifest file in the managed install store (the store directory is missing or never had manifest.json written). Without a manifest there is no record of the current payload, so rollback has nothing to operate on. This is distinct from having a manifest but no previous entry.
Source
Thrown at cli/src/commands/update.ts:130
return leftPart < rightPart ? -1 : 1;
}
return 0;
}
export function resolveUpdateRequest(manifest: InstallManifest | null, options: Pick<UpdateOptions, "canary" | "latest" | "version">): { spec: string; channel: InstallChannel; explicit: boolean } {
const selected = Number(Boolean(options.canary)) + Number(Boolean(options.latest)) + Number(Boolean(options.version));
if (selected > 1) throw new Error("Choose only one of --latest, --canary, or --version.");
if (options.version) return { spec: options.version.trim(), channel: "pinned", explicit: true };
if (options.canary) return { spec: "canary", channel: "canary", explicit: true };
if (options.latest) return { spec: "latest", channel: "latest", explicit: true };
if (manifest?.channel === "pinned") return { spec: manifest.version, channel: "pinned", explicit: false };
const channel = manifest?.channel === "canary" ? "canary" : "latest";
return { spec: channel, channel, explicit: false };
}
export function rollbackManagedInstall(paths = resolveInstallStorePaths()): InstallManifest {
const manifest = readInstallManifest(paths);
if (!manifest) throw new Error("No managed install was found to roll back.");
const target = manifest.previous[0];
if (!target) throw new Error("No previous managed payload is available for rollback.");
if (!fs.existsSync(target.payloadPath)) throw new Error(`Previous payload is missing: ${target.payloadPath}`);
const current: InstallRecord = { source: manifest.source, version: manifest.version, channel: manifest.channel, payloadPath: manifest.payloadPath, repo: manifest.repo, ref: manifest.ref, sha: manifest.sha, installedAt: manifest.installedAt };
const next: InstallManifest = { schemaVersion: manifest.schemaVersion, ...target, previous: [current, ...manifest.previous.slice(1)].slice(0, 2) };
const oldTarget = fs.readlinkSync(paths.currentPath);
flipCurrentAtomic(target.payloadPath, paths);
try { writeInstallManifestAtomic(next, paths); } catch (error) { flipCurrentAtomic(path.resolve(paths.cliRoot, oldTarget), paths); throw error; }
return next;
}
async function defaultConfirm(message: string): Promise<boolean> {
if (!process.stdin.isTTY || !process.stdout.isTTY) return false;
const answer = await p.confirm({ message, initialValue: false });
return !p.isCancel(answer) && answer === true;
}
function emit(options: UpdateOptions, value: Record<string, unknown>, message: string): void { if (options.json) console.log(JSON.stringify(value, null, 2)); else console.log(message); }
View on GitHub (pinned to 67001ec6eb)
Solutions
- Reinstall a managed CLI with `paperclipai install` to regenerate the manifest and store, then updates/rollbacks will work again.
- Restore the missing manifest.json from backup into the managed install store root.
- If the store is unrecoverable, remove the broken store directory entirely and run `paperclipai install` clean.
Defensive patterns
Strategy: try-catch
Validate before calling
import fs from 'node:fs';
import { resolveInstallStorePaths, readInstallManifest } from '../install-store.js';
function hasManagedManifest(): boolean {
const paths = resolveInstallStorePaths();
return fs.existsSync(paths.cliRoot) && readInstallManifest(paths) !== null;
}
// if (!hasManagedManifest()) { /* reinstall before rollback */ } Try / catch
try {
rollbackManagedInstall(paths);
} catch (error) {
if (error instanceof Error && error.message === 'No managed install was found to roll back.') {
// nothing to roll back — reinstall a managed payload instead
await installCommand(/* ... */);
} else throw error;
} Prevention
- Never delete manifest.json from the managed install store; back it up instead.
- Verify the store is intact before attempting rollback.
- Use `paperclipai install` rather than manual file moves to keep the manifest consistent.
When it happens
Trigger: Calling `paperclipai update --rollback`, or rollbackManagedInstall directly, on a system where the managed install store does not exist or its manifest.json was deleted/corrupted. detectInstallMode may still report 'managed' if the symlink resolves, but the manifest read fails.
Common situations: Manifest file manually deleted. Store directory partially wiped (only the payload survives). First-time install that never completed manifest write. Running rollback after the store was moved to a new PAPERCLIP_HOME without copying the manifest.
Related errors
- No previous managed payload is available for rollback.
- ${payloadLabel} failed service validation and was rolled bac
- ${payloadLabel} failed service validation and was rolled bac
- --rollback is only available for managed installs.
- Managed git install metadata is incomplete.
AI-assisted analysis of paperclipai/paperclip@67001ec6eb (2026-08-12).
Data as JSON: /api/errors/0274c18e84bb8039.
Report an issue: GitHub.