{"record":{"id":"7766530825c0ef69","repo":"eyaltoledano/claude-task-master","slug":"no-default-executor-available","errorCode":null,"errorMessage":"No default executor available","messagePattern":"No default executor available","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"packages/tm-core/src/modules/execution/executors/executor-factory.ts","lineNumber":49,"sourceCode":"\t\t\t\tthrow new Error(`Unknown executor type: ${options.type}`);\n\t\t}\n\t}\n\n\t/**\n\t * Get the default executor type based on available tools\n\t */\n\tstatic async getDefaultExecutor(\n\t\tprojectRoot: string\n\t): Promise<ExecutorType | null> {\n\t\t// Check for Claude first\n\t\tconst claudeExecutor = new ClaudeExecutor(projectRoot);\n\t\tif (await claudeExecutor.isAvailable()) {\n\t\t\tthis.logger.info('Claude CLI detected as default executor');\n\t\t\treturn 'claude';\n\t\t}\n\n\t\t// Could check for other executors here\n\t\tthis.logger.warn('No default executor available');\n\t\treturn null;\n\t}\n\n\t/**\n\t * Get list of available executor types\n\t */\n\tstatic getAvailableTypes(): ExecutorType[] {\n\t\treturn ['claude', 'shell', 'custom'];\n\t}\n}\n","sourceCodeStart":31,"sourceCodeEnd":60,"githubUrl":"https://github.com/eyaltoledano/claude-task-master/blob/c0c98d367c55296bfe69e65680625b6db437af02/packages/tm-core/src/modules/execution/executors/executor-factory.ts#L31-L60","documentation":"executor-factory.ts getDefaultExecutor() probes installed AI CLIs (currently only Claude) and returns the detected type or null. When no supported executor binary is found on PATH, it logs 'No default executor available' and returns null, so callers have no executor to run tasks with.","triggerScenarios":"Calling getDefaultExecutor() (e.g. when creating an executor by type) in an environment where the Claude CLI (and any other supported CLIs) are not installed or not on PATH.","commonSituations":"Fresh CI containers without the AI CLI installed, running inside Docker images that omit the CLI, PATH misconfigured for a local npx-style install, or an incompatible CLI version.","solutions":["Install the Claude CLI and verify it is on PATH (`claude --version` works)","Export/extend PATH so the CLI binary is discoverable by the process","Explicitly pass an executor type instead of relying on the default, after confirming that executor's CLI is installed","Handle the null return by surfacing a setup message to the user rather than proceeding"],"exampleFix":"// before\nconst type = await factory.getDefaultExecutor();\n// after\nconst type = await factory.getDefaultExecutor();\nif (!type) throw new Error('No AI executor CLI found; install claude and ensure it is on PATH');","handlingStrategy":"fallback","validationCode":"import { execSync } from 'child_process';\nfunction claudeCliOnPath(): boolean {\n  try { execSync('claude --version', { stdio: 'ignore' }); return true; }\n  catch { return false; }\n}","typeGuard":"function hasDefaultExecutor(t: string | null): t is Exclude<typeof t, null> {\n  return t !== null;\n}","tryCatchPattern":"const type = await factory.getDefaultExecutor();\nif (!hasDefaultExecutor(type)) {\n  throw new Error('No AI executor CLI found on PATH; install claude CLI first');\n}","preventionTips":["Install the executor CLI in your Dockerfile/CI image","Verify CLI availability in a preflight/setup script","Extend PATH for npx-style local installs","Handle the null return explicitly instead of assuming success"],"tags":["executor","cli","environment"],"backgroundTag":"no-default-executor-available","analyzedSha":"c0c98d367c55296bfe69e65680625b6db437af02","analyzedAt":"2026-08-29T02:56:26.071Z","schemaVersion":2},"datasetVersion":"2026-08-29T07:17:48.351Z"}