musistudio/claude-code-router · error · Error
Profile launcher was not found: ${plan.command}. Re-save the
Error message
Profile launcher was not found: ${plan.command}. Re-save the profile and try again. What it means
Thrown by buildProfileLaunchPlan consumers when the resolved launcher command for a saved Codex-compatible app profile is an absolute path that no longer exists on disk. The profile stores the absolute path of its launcher executable at save time, and this guard verifies it before spawning. If the binary was moved, uninstalled, or the profile was copied from another machine, launch aborts.
Source
Thrown at packages/core/src/agents/codex/app-launch.ts:581
}
function launchCodexCompatibleAppProfile(
configDir: string,
profile: ProfileConfig,
spec: CodexCompatibleAppSpec,
config?: AppConfig
): CodexAppLaunchResult {
const lookup = findInstalledCodexCompatibleAppExecutable(spec, profile.appPath);
if (!lookup.executable) {
throw new Error([
`${spec.displayName} was not found. Install ${spec.displayName} or set ${spec.envPathKeys[1]} to its executable, then try again.`,
lookup.checked.length ? `Checked: ${lookup.checked.join(", ")}` : ""
].filter(Boolean).join(" "));
}
const plan = buildProfileLaunchPlan(configDir, profile, "app");
if (path.isAbsolute(plan.command) && !existsSync(plan.command)) {
throw new Error(`Profile launcher was not found: ${plan.command}. Re-save the profile and try again.`);
}
const configFile = resolveCodexConfigFile(configDir, profile);
const codexHome = codexCompatibleHomeFromConfigFile(spec, configFile);
const { modelCatalogFile, userDataDir, workbuddyVirtualAuth } = refreshCodexCompatibleAppProfileFiles(configDir, profile, config);
if (spec.kind === "codex") prepareCodexAppCdpUserDataDir(userDataDir);
const appEnv: Record<string, string> = {
...plan.env,
...(config ? botGatewayProfileEnv(config, profile, "app") : {}),
...codexProfileEnv(profile, lookup.executable, spec),
CODEXL_PROFILE_SURFACE: "app",
CCR_PROFILE_SURFACE: "app",
...codexAppAgentEnv(spec, plan.command, codexHome, userDataDir, modelCatalogFile, workbuddyVirtualAuth),
...codexCompatibleAppGatewayEnv(spec, config),
ELECTRON_ENABLE_LOGGING: "1"
};
const env: NodeJS.ProcessEnv = {View on GitHub (pinned to 99f24806c6)
Solutions
- Re-save the profile from the app so the launcher path is re-resolved to the current install location
- Verify the absolute path in the profile exists: ls <plan.command>; if not, locate the new binary and update the profile
- Reinstall the application whose launcher the profile points to
- If the profile is machine-specific, delete it and create a new one on this machine
Example fix
// before
await launchCodexAppProfile(configDir, profile, config); // throws: launcher not found
// after
const plan = buildProfileLaunchPlan(configDir, profile, "app");
if (path.isAbsolute(plan.command) && !existsSync(plan.command)) {
await reSaveAppProfile(configDir, profile); // re-resolve launcher path
}
await launchCodexAppProfile(configDir, profile, config); Defensive patterns
Strategy: validation
Validate before calling
import { existsSync } from "node:fs";
import path from "node:path";
const plan = buildProfileLaunchPlan(configDir, profile, "app");
if (path.isAbsolute(plan.command) && !existsSync(plan.command)) {
await reSaveProfile(configDir, profile); // or surface a friendly error
} Type guard
null
Try / catch
try { await launchCodexAppProfile(configDir, profile, config); } catch (e) { if (/Profile launcher was not found/.test(String(e))) { await reSaveProfile(configDir, profile); } else throw e; } Prevention
- Re-save app profiles after reinstalling or upgrading the launcher application
- Avoid copying profile configs between machines with absolute launcher paths
- Check existsSync(plan.command) before launching in CI or fresh environments
When it happens
Trigger: Calling launchCodexAppProfile / launchZcodeAppProfile / launchWorkbuddyAppProfile with a profile whose plan.command is absolute and existsSync() fails (deleted/moved executable, stale profile from another machine, missing dependency in a fresh checkout).
Common situations: App was updated and the old install path removed; profile saved under a per-version directory (e.g. an electron app in versioned folder); profile JSON migrated between machines or containers; launcher installed via nvm/volta whose node version changed.
AI-assisted analysis of musistudio/claude-code-router@99f24806c6 (2026-08-27).
Data as JSON: /api/errors/81e42e8db887da9f.
Report an issue: GitHub.