musistudio/claude-code-router · error · ProfileGatewayUnavailableError
CCR gateway is not running at ${profileGatewayEndpoint(confi
Error message
CCR gateway is not running at ${profileGatewayEndpoint(config)}${reason}. Start CCR Desktop or run ccr start before opening ${appName}. What it means
Error "CCR gateway is not running at ${profileGatewayEndpoint(config)}${reason}. Start CCR Desktop or run ccr start before opening ${appName}." thrown in musistudio/claude-code-router.
Source
Thrown at packages/core/src/profiles/launch-service.ts:412
};
async function ensureGatewayConfigRunning(
config: AppConfig,
profile: ReturnType<typeof findProfileForOpen>,
appName: string,
options: { reuseExisting?: boolean; startIfMissing?: boolean } = {},
candidateConfig: AppConfig = config
): Promise<EnsureGatewayConfigRunningResult> {
const startIfMissing = options.startIfMissing !== false;
if (options.reuseExisting) {
const existingGateway = await probeExistingProfileGateway(config, profile, candidateConfig);
if (existingGateway.state === "usable") {
return { acceptedApiKey: existingGateway.apiKey, config };
}
if (existingGateway.state === "unavailable") {
if (!startIfMissing) {
const reason = existingGateway.reason ? `: ${existingGateway.reason}` : "";
throw new ProfileGatewayUnavailableError(`CCR gateway is not running at ${profileGatewayEndpoint(config)}${reason}. Start CCR Desktop or run ccr start before opening ${appName}.`);
}
} else {
throw new Error(existingGatewayConflictMessage(existingGateway, appName));
}
}
if (!startIfMissing) {
throw new ProfileGatewayUnavailableError(`CCR gateway is not running at ${profileGatewayEndpoint(config)}. Start CCR Desktop or run ccr start before opening ${appName}.`);
}
const startedStatus = await gatewayService.start(config);
if (startedStatus.state === "running") {
return { config };
}
if (options.reuseExisting && isAddressInUseError(startedStatus.lastError)) {
const existingGateway = await probeExistingProfileGateway(config, profile, candidateConfig);
if (existingGateway.state === "usable") {View on GitHub (pinned to 99f24806c6)
When it happens
Trigger: Thrown at packages/core/src/profiles/launch-service.ts:412 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/d29e079141bb3d01.
Report an issue: GitHub.