{"record":{"id":"30383caad1d46847","repo":"affaan-m/ECC","slug":"worker-workername-is-missing-a-launchercommand","errorCode":null,"errorMessage":"Worker ${workerName} is missing a launcherCommand","messagePattern":"Worker (.+?) is missing a launcherCommand","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"scripts/lib/tmux-worktree-orchestrator.js","lineNumber":229,"sourceCode":"    const handoffFilePath = path.join(workerCoordinationDir, 'handoff.md');\n    const statusFilePath = path.join(workerCoordinationDir, 'status.md');\n    const launcherCommand = worker.launcherCommand || defaultLauncher;\n    const workerSeedPaths = normalizeSeedPaths(worker.seedPaths, repoRoot);\n    const seedPaths = normalizeSeedPaths([...globalSeedPaths, ...workerSeedPaths], repoRoot);\n    const templateVariables = buildTemplateVariables({\n      branch_name: branchName,\n      handoff_file: handoffFilePath,\n      repo_root: repoRoot,\n      session_name: sessionName,\n      status_file: statusFilePath,\n      task_file: taskFilePath,\n      worker_name: workerName,\n      worker_slug: workerSlug,\n      worktree_path: worktreePath\n    });\n\n    if (!launcherCommand) {\n      throw new Error(`Worker ${workerName} is missing a launcherCommand`);\n    }\n\n    const gitArgs = ['worktree', 'add', '-b', branchName, worktreePath, baseRef];\n\n    return {\n      branchName,\n      coordinationDir: workerCoordinationDir,\n      gitArgs,\n      gitCommand: formatCommand('git', gitArgs),\n      handoffFilePath,\n      launchCommand: renderTemplate(launcherCommand, templateVariables),\n      repoRoot,\n      sessionName,\n      seedPaths,\n      statusFilePath,\n      task: worker.task.trim(),\n      taskFilePath,\n      workerName,","sourceCodeStart":211,"sourceCodeEnd":247,"githubUrl":"https://github.com/affaan-m/ECC/blob/8321021c54d670126ce3b2969d5deb880b4b0c2a/scripts/lib/tmux-worktree-orchestrator.js#L211-L247","documentation":"Each worker plan needs a command that tmux will use to launch the worker process. After resolving the launcher from worker config (with defaults), buildOrchestrationPlan throws if no launcherCommand was resolved, because a worktree would be created with nothing to run in it.","triggerScenarios":"Calling plan() with a worker entry that defines neither a launcherCommand nor matches any default launcher rule (e.g. no recognized agent type), leaving launcherCommand undefined/null.","commonSituations":"Adding a new worker to the config with a custom role but forgetting the launcherCommand field; a typo in the field name (launchCommand vs launcherCommand); using a worker type the orchestrator has no default launcher for.","solutions":["Add a launcherCommand to the worker entry in the orchestration config.","Fix the field name typo so it is exactly launcherCommand.","Use a worker type/name the orchestrator recognizes so its default launcher applies.","Verify the value is non-empty — an empty string may also fail the !launcherCommand check depending on how it's resolved."],"exampleFix":"// before\n{ name: 'reviewer' }\n// after\n{ name: 'reviewer', launcherCommand: 'claude' }","handlingStrategy":"validation","validationCode":"for (const w of config.workers) {\n  if (typeof w.launcherCommand !== 'string' || w.launcherCommand.trim() === '') {\n    throw new Error(`worker '${w.name}' needs a non-empty launcherCommand`);\n  }\n}","typeGuard":"const hasLauncher = (w) => typeof w === 'object' && w !== null && typeof w.launcherCommand === 'string' && w.launcherCommand.length > 0;","tryCatchPattern":"try {\n  const plan = buildOrchestrationPlan(config);\n} catch (err) {\n  const m = err.message.match(/Worker (.+) is missing a launcherCommand/);\n  if (m) {\n    console.error(`Add launcherCommand to worker '${m[1]}' in the config`);\n    return;\n  }\n  throw err;\n}","preventionTips":["Validate worker entries with a schema (zod) requiring launcherCommand at config load time","Spell the field exactly launcherCommand (no launchCommand)","Only use worker types the orchestrator documents as having default launchers","Add a dry-run/validate subcommand to check the plan without executing"],"tags":["configuration","missing-field","workers"],"backgroundTag":"missing-required-config-field","analyzedSha":"8321021c54d670126ce3b2969d5deb880b4b0c2a","analyzedAt":"2026-09-16T10:08:13.343Z","contentChangedAt":"2026-09-16T10:08:13.343Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}