musistudio/claude-code-router · error · Error

ToolHub MCP runtime was not found. Rebuild or reinstall CCR

Error message

ToolHub MCP runtime was not found. Rebuild or reinstall CCR and try again. Checked: ${bundledToolHubMcpEntryPathCandidates().join(", ")}

What it means

Error "ToolHub MCP runtime was not found. Rebuild or reinstall CCR and try again. Checked: ${bundledToolHubMcpEntryPathCandidates().join(", ")}" thrown in musistudio/claude-code-router.

Source

Thrown at packages/core/src/profiles/service.ts:922

      model: toolHubResolverModel(config)
    }
  });
  if (!runtime) {
    return { changed: false };
  }

  const runtimeResult = ensureToolHubMcpRuntimeFile(entryPath);
  return {
    changed: runtimeResult.changed,
    file: entryPath,
    runtime
  };
}

function ensureToolHubMcpRuntimeFile(file: string): { changed: boolean } {
  const source = bundledToolHubMcpEntryPathCandidates().find((candidate) => existsSync(candidate));
  if (!source) {
    throw new Error(`ToolHub MCP runtime was not found. Rebuild or reinstall CCR and try again. Checked: ${bundledToolHubMcpEntryPathCandidates().join(", ")}`);
  }
  return writeGeneratedFileIfChanged(file, readFileSync(source, "utf8"), { mode: publicExecutableMode });
}

function resolveCodexConfigFile(profile: ProfileConfig): string {
  if (profile.agent === "zcode") {
    return resolveZcodeConfigFile(profile);
  }
  if (isGeneratedProfileScope(profile.scope)) {
    return path.join(ccrManagedProfileDir(profile), codexConfigSubdir(profile.agent), "config.toml");
  }
  const codexHome = profile.codexHome?.trim();
  if (codexHome) {
    return path.join(resolveUserPath(codexHome), "config.toml");
  }
  return resolveUserPath(profile.configFile || defaultCodexConfigFile(profile.agent));
}

View on GitHub (pinned to 99f24806c6)

When it happens

Trigger: Thrown at packages/core/src/profiles/service.ts:922 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/bb3f8ff81eb3a2dd. Report an issue: GitHub.