{"record":{"id":"af6d6a7ceb575edd","repo":"different-ai/openwork","slug":"openwork-computer-use-is-missing-from-this-openwor","errorCode":null,"errorMessage":"OpenWork Computer Use is missing from this OpenWork build.","messagePattern":"OpenWork Computer Use is missing from this OpenWork build\\.","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"critical","filePath":"apps/desktop/electron/computer-use.mjs","lineNumber":44,"sourceCode":"}\n\nfunction computerUseHelperAppPath() {\n  const explicitApp = process.env.OPENWORK_COMPUTER_USE_APP?.trim();\n  const candidates = [\n    explicitApp,\n    process.resourcesPath ? path.join(process.resourcesPath, \"helpers\", COMPUTER_USE_HELPER_APP_NAME) : null,\n    path.resolve(__dirname, \"..\", \"resources\", \"helpers\", COMPUTER_USE_HELPER_APP_NAME),\n  ].filter(Boolean);\n\n  return candidates.find((candidate) => existsSync(candidate)) ?? null;\n}\n\nfunction getComputerUseMcpCommand() {\n  const helperExecutable = computerUseHelperExecutablePath();\n  if (helperExecutable) return [helperExecutable, \"mcp\"];\n\n  if (app.isPackaged) {\n    throw new Error(\"OpenWork Computer Use is missing from this OpenWork build.\");\n  }\n\n  if (process.env.OPENWORK_DEV_MODE === \"1\") {\n    return [\"node\", path.resolve(__dirname, \"../../..\", \"packages/handsfree/bin/openwork-handsfree-computer-use.mjs\"), \"mcp\"];\n  }\n  return [\"npx\", \"-y\", \"@openwork/handsfree\", \"mcp\"];\n}\n\n// ---------------------------------------------------------------------------\n// Permission checks — spawn the binary with --check, read stdout, done.\n// Fresh process = fresh TCC read = always accurate. No HTTP server needed.\n// ---------------------------------------------------------------------------\n\nfunction resolveComputerUseExecutable() {\n  // 1. Explicit env override.\n  const explicit = process.env.OPENWORK_COMPUTER_USE_BINARY?.trim();\n  if (explicit && existsSync(explicit)) return explicit;\n","sourceCodeStart":26,"sourceCodeEnd":62,"githubUrl":"https://github.com/different-ai/openwork/blob/2b7df46e8ae1517d64c896c7793d2d52ec845669/apps/desktop/electron/computer-use.mjs#L26-L62","documentation":"getComputerUseMcpCommand locates the bundled Computer Use helper executable; in a packaged (production) build with no helper binary present, it throws this error instead of silently degrading. Dev builds fall back to local/npx paths, but packaged builds require the shipped helper.","triggerScenarios":"Launching Computer Use MCP from a packaged OpenWork install where computerUseHelperExecutablePath() returns null — e.g. a partial/incomplete build, an installer variant that omits the helper, or packaging config that failed to include the helper binary.","commonSituations":"Installing a trimmed/open-source build without the proprietary helper; antivirus quarantining the helper executable; ASAR packaging excluding the binary; upgrading and the helper path changing while stale code looks in the old location.","solutions":["Reinstall/repair the full OpenWork build so the Computer Use helper ships with the app","Verify packaging config includes the handsfree/computer-use helper executable (extraResources/asarUnpack)","Run in dev (OPENWORK_DEV_MODE=1) which falls back to packages/handsfree/bin or npx @openwork/handsfree","Check antivirus/quarantine logs if the helper existed but cannot be found at runtime"],"exampleFix":"// packaging config (electron-builder)\n// before\nextraResources: []\n// after\nextraResources: [{ from: 'packages/handsfree/bin', to: 'helpers/handsfree' }]","handlingStrategy":"try-catch","validationCode":"// in main process, before launching computer use\nimport { app } from 'electron';\nif (app.isPackaged && typeof computerUseHelperExecutablePath !== 'function') {\n  console.warn('Computer Use helper unavailable in this build');\n}\n// or verify presence\n// fs.existsSync(helperPath) check where the build installs it","typeGuard":"function computerUseAvailable(isPackaged, helperPath) { return !isPackaged || Boolean(helperPath); }","tryCatchPattern":"try {\n  const cmd = getComputerUseMcpCommand();\n} catch (e) {\n  if (e.message.includes('Computer Use is missing from this OpenWork build')) {\n    // disable the Computer Use feature and inform the user to install the full build\n  } else throw e;\n}","preventionTips":["Install the complete packaged build that ships the Computer Use helper","Verify packaging config includes the helper under extraResources/asarUnpack","Gate the Computer Use UI on helper availability instead of failing at invocation","Set OPENWORK_DEV_MODE=1 in dev environments to use the local/npx fallback"],"tags":["packaging","missing-binary","computer-use","electron"],"backgroundTag":"missing-executable","analyzedSha":"2b7df46e8ae1517d64c896c7793d2d52ec845669","analyzedAt":"2026-09-01T07:59:23.713Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}