{"record":{"id":"2f401477d80b44ac","repo":"musistudio/claude-code-router","slug":"pi-profiles-only-support-cli-opening","errorCode":null,"errorMessage":"Pi profiles only support CLI opening.","messagePattern":"Pi profiles only support CLI opening\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/core/src/profiles/launch-core.ts","lineNumber":224,"sourceCode":"  return {\n    args: extraArgs,\n    command: path.join(configDir, \"bin\", kimiWrapperFilename(profile)),\n    env: {\n      CCR_PROFILE_SURFACE: \"cli\"\n    },\n    profile,\n    surface\n  };\n}\n\nfunction buildPiLaunchPlan(\n  configDir: string,\n  profile: ProfileConfig,\n  surface: ProfileOpenSurface,\n  extraArgs: string[]\n): ProfileLaunchPlan {\n  if (surface !== \"cli\") {\n    throw new Error(\"Pi profiles only support CLI opening.\");\n  }\n  return {\n    args: extraArgs,\n    command: path.join(configDir, \"bin\", piWrapperFilename(profile)),\n    env: {\n      CCR_PROFILE_SURFACE: \"cli\",\n      PI_CODING_AGENT_DIR: resolvePiAgentDir(configDir, profile),\n      PI_CODING_AGENT_SESSION_DIR: resolvePiSessionDir(configDir, profile)\n    },\n    profile,\n    surface\n  };\n}\n\nexport function profileLaunchSpawnCommand(plan: Pick<ProfileLaunchPlan, \"args\" | \"command\">): ProfileLaunchSpawnCommand {\n  if (!isWindowsCommandScript(plan.command)) {\n    return {\n      args: plan.args,","sourceCodeStart":206,"sourceCodeEnd":242,"githubUrl":"https://github.com/musistudio/claude-code-router/blob/99f24806c6a2c660b16e53e95211c517448a6c90/packages/core/src/profiles/launch-core.ts#L206-L242","documentation":"Error \"Pi profiles only support CLI opening.\" thrown in musistudio/claude-code-router.","triggerScenarios":"Thrown at packages/core/src/profiles/launch-core.ts:224 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"}