{"record":{"id":"29263caea9e06519","repo":"musistudio/claude-code-router","slug":"claude-app-profiles-do-not-support-agent-arguments","errorCode":null,"errorMessage":"Claude App profiles do not support agent arguments.","messagePattern":"Claude App profiles do not support agent arguments\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/cli/src/cli.ts","lineNumber":128,"sourceCode":"    printHelp(profileOptions.help ? 0 : 2);\n    return;\n  }\n\n  const configDir = CONFIGDIR;\n  const config = await loadAppConfig();\n  assertAvailableGatewayModels(config);\n  await applyProfileConfig(config);\n  const profile = findProfileForOpen(config, profileOptions.profileRef);\n  const surface = profileOptions.surface ?? defaultProfileOpenSurface(profile);\n  const resolvedSurface = resolveProfileOpenSurface(profile, surface);\n  if (profile.agent === \"zcode\" && profileOptions.agentArgs.length > 0) {\n    throw new Error(\"ZCode profiles can only open the app; agent arguments are not supported.\");\n  }\n  if (profile.agent === \"claude-design\") {\n    throw new Error(\"Claude Design profiles can only be opened from CCR Desktop.\");\n  }\n  if (profile.agent === \"claude-code\" && resolvedSurface === \"app\" && profileOptions.agentArgs.length > 0) {\n    throw new Error(\"Claude App profiles do not support agent arguments.\");\n  }\n  if (profile.agent === \"codex\" && resolvedSurface === \"app\" && profileOptions.agentArgs.length === 0) {\n    const state = await startService({\n      command: \"start\",\n      daemonChild: false,\n      ensureGatewayRunning: true,\n      help: false,\n      open: false,\n      profileManaged: false,\n      startGateway: true\n    });\n    const opened = await callServiceRpc<ProfileOpenResult>(state, \"openProfile\", [{ profileId: profile.id, surface: \"app\" }], 30_000);\n    process.stdout.write(`${opened.message}\\n`);\n    return;\n  }\n\n  const autoStartProfileGateway = shouldAutoStartProfileGateway(profile, resolvedSurface);\n  let profileGatewayLease = autoStartProfileGateway ? acquireManagedProfileGatewayLease() : undefined;","sourceCodeStart":110,"sourceCodeEnd":146,"githubUrl":"https://github.com/musistudio/claude-code-router/blob/99f24806c6a2c660b16e53e95211c517448a6c90/packages/cli/src/cli.ts#L110-L146","documentation":"Re-thrown from downloadUpdate in the Electron update service when the underlying autoUpdater download fails. The original error is formatted, published to status, and re-thrown so callers see the failure reason.","triggerScenarios":"Calling downloadUpdate(); electron-updater throws during download (feed URL unreachable, 404 on latest.yml, network failure, disk write error) and the catch block publishes state:'error' then throws new Error(status.lastError).","commonSituations":"CCR_UPDATE_FEED_URL pointing at a missing/bad release feed; GitHub rate-limiting or 404 on latest.yml; corporate proxy blocking HTTPS; insufficient disk space or permissions for the download cache; electron-updater version mismatch with the published artifacts.","solutions":["Check the formatted message for the underlying cause (feed URL, 404, network)","Verify CCR_UPDATE_FEED_URL / publish configuration serves a valid latest.yml reachable from the machine","Test the feed URL with curl from the same network; fix proxy/TLS issues","If disk-related, clear the electron-updater cache directory and free space","Retry the download once transient network failures clear"],"exampleFix":null,"handlingStrategy":"retry","validationCode":"const feed = readEnvString('CCR_UPDATE_FEED_URL');\nif (feed) {\n  const res = await fetch(feed.replace(/[^/]*$/, 'latest.yml'));\n  if (!res.ok) { /* surface feed problem before calling downloadUpdate */ }\n}","typeGuard":null,"tryCatchPattern":"try {\n  await updateService.downloadUpdate();\n} catch (error) {\n  logger.error('update download failed', formatError(error));\n  await backoffRetry(); // network/feed issues are often transient\n}","preventionTips":["Validate the update feed URL is reachable at app start","Watch update status events and only enable UI actions when state isn't 'error'","Keep electron-updater version in sync with published artifact format"],"tags":["electron","auto-update","download","network"],"backgroundTag":"auto-update-download-failed","analyzedSha":"99f24806c6a2c660b16e53e95211c517448a6c90","analyzedAt":"2026-08-27T04:11:01.184Z","schemaVersion":2},"datasetVersion":"2026-08-27T08:17:20.692Z"}