{"record":{"id":"f5e8c391260bccf4","repo":"musistudio/claude-code-router","slug":"appname-is-still-running-with-stale-settings-fo","errorCode":null,"errorMessage":"${appName} is still running with stale settings for ${profile.name || profile.id}. Close it before reopening this profile.","messagePattern":"(.+?) is still running with stale settings for (.+?)\\. Close it before reopening this profile\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/core/src/profiles/launch-service.ts","lineNumber":200,"sourceCode":"    if (existing.launchSignature === launchSignature) {\n      startOpenCodeAppBotWorker(\n        profileGatewayConfig,\n        profile,\n        configResult.file,\n        configResult.inlineConfig,\n        launchSignature\n      );\n      activateProfileAppWindow(existing);\n      return {\n        message: `${appName} is already running with ${profile.name || profile.id}.`,\n        profileId: profile.id,\n        profileName: profile.name,\n        surface: \"app\"\n      };\n    }\n    const stopped = await stopRunningProfileApp(profileRuntimeKey(profile.id, \"app\"), existing);\n    if (!stopped && isProfileAppRunning(existing)) {\n      throw new Error(\n        `${appName} is still running with stale settings for ${profile.name || profile.id}. ` +\n        \"Close it before reopening this profile.\"\n      );\n    }\n    stopOpenCodeAppBotWorker(profile.id);\n  }\n  const otherProfile = runningProfileAppForAgent(\"opencode\", \"app\", profile.id);\n  if (otherProfile) {\n    const stopped = await stopRunningProfileApp(profileRuntimeKey(otherProfile.profileId, \"app\"), otherProfile);\n    if (!stopped && isProfileAppRunning(otherProfile)) {\n      throw new Error(\n        `OpenCode App is already running with ${otherProfile.profileName || otherProfile.profileId}. ` +\n        \"Close it before switching OpenCode App profiles.\"\n      );\n    }\n    stopOpenCodeAppBotWorker(otherProfile.profileId);\n  }\n  const unmanagedPid = findRunningOpenCodeAppPid(profile.appPath);","sourceCodeStart":182,"sourceCodeEnd":218,"githubUrl":"https://github.com/musistudio/claude-code-router/blob/99f24806c6a2c660b16e53e95211c517448a6c90/packages/core/src/profiles/launch-service.ts#L182-L218","documentation":"Error \"${appName} is still running with stale settings for ${profile.name || profile.id}. Close it before reopening this profile.\" thrown in musistudio/claude-code-router.","triggerScenarios":"Thrown at packages/core/src/profiles/launch-service.ts:200 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"99f24806c6a2c660b16e53e95211c517448a6c90","analyzedAt":"2026-08-27T04:11:01.184Z","schemaVersion":2},"datasetVersion":"2026-08-27T08:17:20.692Z"}