{"record":{"id":"83c25ffcda82c3b0","repo":"paperclipai/paperclip","slug":"manager-servicename-is-still-loaded-after-unins","errorCode":null,"errorMessage":"${manager.serviceName} is still loaded after uninstall.","messagePattern":"(.+?) is still loaded after uninstall\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"cli/src/commands/service.ts","lineNumber":191,"sourceCode":"    .action(async (opts) => {\n      const manager = await resolveManager(opts); if (!manager) return;\n      const result = await manager.install({ startNow: opts.startNow, startOnLogin: opts.startOnLogin });\n      let lingerEnabled = false;\n      if (manager.enableLinger) {\n        let consent = opts.enableLinger === true;\n        if (!consent && process.stdin.isTTY && process.stdout.isTTY) {\n          consent = await p.confirm({ message: \"Allow Paperclip to run without an active login session? This runs 'loginctl enable-linger' for your user and may request system authorization.\", initialValue: false }) === true;\n        }\n        if (consent) { await manager.enableLinger(); lingerEnabled = true; }\n      }\n      output({ installed: true, changed: result.changed, platform: manager.platform, serviceName: manager.serviceName, definitionPath: manager.definitionPath, lingerEnabled }, opts.json);\n    });\n\n  common(service.command(\"uninstall\").description(\"Stop, disable, and remove the background service\")).action(async (opts) => {\n    const manager = await resolveManager(opts); if (!manager) return;\n    await manager.uninstall();\n    const status = await manager.status();\n    if (status.installed || status.active) throw new Error(`${manager.serviceName} is still loaded after uninstall.`);\n    output({ uninstalled: true, serviceName: manager.serviceName }, opts.json);\n  });\n\n  for (const verb of [\"start\", \"stop\"] as const) {\n    common(service.command(verb).description(`${verb === \"start\" ? \"Start\" : \"Stop\"} the background service`)).action(async (opts) => {\n      const manager = await resolveManager(opts); if (!manager) return;\n      await manager[verb]();\n      output(await manager.status(), opts.json);\n    });\n  }\n\n  common(service.command(\"restart\").description(\"Hot-restart the service while preserving active agent runs\"))\n    .option(\"--wait\", \"Wait for active runs to drain instead of adopting them\", false)\n    .option(\"--expected-version <version>\", \"Require the restarted server to report this version\")\n    .action(async (opts) => output(await restartManagedService({ instanceId: opts.instance, expectedVersion: opts.expectedVersion, waitForDrain: opts.wait }), opts.json));\n\n  common(service.command(\"status\").description(\"Show supervisor and health status\")).action(async (opts) => {\n    const manager = await resolveManager(opts); if (!manager) return;","sourceCodeStart":173,"sourceCodeEnd":209,"githubUrl":"https://github.com/paperclipai/paperclip/blob/120ae5428fa29bee300bcf806491cd4d965fbb7c/cli/src/commands/service.ts#L173-L209","documentation":"After service uninstall the manager still reports the service as loaded, meaning the service-manager unload failed to take effect; a post-condition guard on uninstall.","triggerScenarios":"Thrown at cli/src/commands/service.ts:191 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Uninstall the service again after the manager fully reloads, or remove it via the service manager directly."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"120ae5428fa29bee300bcf806491cd4d965fbb7c","analyzedAt":"2026-08-18T22:49:45.177Z","contentChangedAt":"2026-08-18T22:49:45.177Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}