musistudio/claude-code-router · error

${status.lastError || "CCR gateway did not start."}

Error message

${status.lastError || "CCR gateway did not start."}

What it means

Error "${status.lastError || "CCR gateway did not start."}" thrown in musistudio/claude-code-router.

Source

Thrown at packages/electron/src/main/ipc.ts:206

});
ipcMain.handle(IPC_CHANNELS.appOpenExternal, async (_event, url: string) => {
  const parsed = new URL(url);
  if (!["http:", "https:"].includes(parsed.protocol)) {
    throw new Error("Only http and https URLs can be opened.");
  }
  await shell.openExternal(parsed.toString());
});
ipcMain.handle(IPC_CHANNELS.appOpenProfile, async (_event, request: ProfileOpenRequest) => {
  const syncedClaudeAppConfig = await syncClaudeAppGatewayConfig(await loadAppConfig());
  const profile = findProfileForOpen(syncedClaudeAppConfig.config, request.profileId);
  const surface = resolveProfileOpenSurface(profile, request.surface);
  const config = profile.agent === CLAUDE_DESIGN_PLUGIN_ID
    ? withClaudeDesignRuntimePluginConfig(syncedClaudeAppConfig.config)
    : syncedClaudeAppConfig.config;
  if (profile.agent === CLAUDE_DESIGN_PLUGIN_ID) {
    const status = await gatewayService.ensureStarted(config);
    if (status.state !== "running") {
      throw new Error(status.lastError || "CCR gateway did not start.");
    }
    logProfileApplyResult(await applyProfileConfig(config));
    await deepLinkService.openPluginApp(CLAUDE_DESIGN_PLUGIN_ID);
    return {
      message: `Opened Claude Design with ${profile.name || profile.id}.`,
      profileId: profile.id,
      profileName: profile.name,
      surface
    } satisfies ProfileOpenResult;
  }
  return openProfileFromCcr(config, request);
});
ipcMain.handle(IPC_CHANNELS.appApplyClaudeAppGateway, async (_event, config?: AppConfig) => {
  const previousConfig = await loadAppConfig();
  const baseConfig = config ? await saveAppConfig(config) : previousConfig;
  applyNativeThemePreference(baseConfig.theme);
  const synced = await syncClaudeAppGatewayConfig(baseConfig);
  const savedConfig = synced.config;

View on GitHub (pinned to 99f24806c6)

When it happens

Trigger: Thrown at packages/electron/src/main/ipc.ts:206 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of musistudio/claude-code-router@99f24806c6 (2026-08-27). Data as JSON: /api/errors/e2b34cc42bf04d4a. Report an issue: GitHub.