{"record":{"id":"e147e36aa796e21e","repo":"stablyai/orca","slug":"invalid-argument-e147e3","errorCode":"invalid_argument","errorMessage":"The packaged Orca launcher did not provide a valid resume command. No question was created.","messagePattern":"The packaged Orca launcher did not provide a valid resume command\\. No question was created\\.","errorType":"exception","errorClass":"RuntimeClientError","httpStatus":null,"severity":"error","filePath":"src/cli/handlers/orchestration.ts","lineNumber":129,"sourceCode":"    }\n\nfunction resolveCompatibilityCliCommand(): 'orca' | 'orca-ide' | 'orca-dev' {\n  const configured = process.env.ORCA_CLI_COMMAND\n  if (configured === 'orca' || configured === 'orca-ide' || configured === 'orca-dev') {\n    return configured\n  }\n  return process.platform === 'linux' ? 'orca-ide' : 'orca'\n}\n\nfunction resolvePackagedWindowsCompatibilityCommand(): 'orca' | 'orca-ide' | undefined {\n  if (process.env.ORCA_WINDOWS_PACKAGED_CLI_LAUNCHER !== '1') {\n    return undefined\n  }\n  const command = process.env.ORCA_CLI_COMMAND\n  if (command === 'orca' || command === 'orca-ide') {\n    return command\n  }\n  throw new RuntimeClientError(\n    'invalid_argument',\n    'The packaged Orca launcher did not provide a valid resume command. No question was created.'\n  )\n}\n\nasync function flushStdout(): Promise<void> {\n  await new Promise<void>((resolve, reject) => {\n    process.stdout.write('', (error) => {\n      if (error) {\n        reject(error)\n      } else {\n        resolve()\n      }\n    })\n  })\n}\n\nfunction getOptionalStructuredMessagePayload(","sourceCodeStart":111,"sourceCodeEnd":147,"githubUrl":"https://github.com/stablyai/orca/blob/1136503c6a231a16dce8f921f6fadb63d181e8db/src/cli/handlers/orchestration.ts#L111-L147","documentation":"Thrown by resolvePackagedWindowsCompatibilityCommand when the packaged Orca launcher indicates it should provide a resume command (ORCA_WINDOWS_PACKAGED_CLI_LAUNCHER=1) but the command environment variable is missing or not one of 'orca'/'orca-ide'. This is an internal launcher-configuration error on Windows packaged builds: the orchestration/resume flow needs a known-good command to relaunch, and the launcher did not supply one.","triggerScenarios":"Running a packaged Windows Orca build where ORCA_WINDOWS_PACKAGED_CLI_LAUNCHER=1 is set but ORCA_CLI_COMMAND is unset, empty, or set to something other than 'orca' or 'orca-ide'. The check reads process.env.ORCA_CLI_COMMAND and compares against the two allowed values.","commonSituations":"A packaged build whose launcher forgot to set ORCA_CLI_COMMAND; a custom launcher/wrapper that sets the flag but not the command; an env that was partially migrated; testing a resume/orchestration flow without the full launcher env.","solutions":["Set ORCA_CLI_COMMAND to 'orca' or 'orca-ide' in the packaged launcher environment.","If you do not need the packaged-compatibility path, unset ORCA_WINDOWS_PACKAGED_CLI_LAUNCHER so the normal command resolution applies.","Update the packaged launcher/installer to always export ORCA_CLI_COMMAND alongside the flag."],"exampleFix":"// before\nexport ORCA_WINDOWS_PACKAGED_CLI_LAUNCHER=1\n# ORCA_CLI_COMMAND missing\n// after\nexport ORCA_WINDOWS_PACKAGED_CLI_LAUNCHER=1\nexport ORCA_CLI_COMMAND=orca","handlingStrategy":"validation","validationCode":"function resolveLauncherCommand(): 'orca' | 'orca-ide' | undefined {\n  if (process.env.ORCA_WINDOWS_PACKAGED_CLI_LAUNCHER !== '1') return undefined;\n  const cmd = process.env.ORCA_CLI_COMMAND;\n  if (cmd === 'orca' || cmd === 'orca-ide') return cmd;\n  throw new Error('Set ORCA_CLI_COMMAND to \"orca\" or \"orca-ide\" for the packaged launcher');\n}","typeGuard":"function isLauncherCommand(value: unknown): value is 'orca' | 'orca-ide' {\n  return value === 'orca' || value === 'orca-ide';\n}","tryCatchPattern":null,"preventionTips":["Ensure the packaged launcher exports ORCA_CLI_COMMAND alongside ORCA_WINDOWS_PACKAGED_CLI_LAUNCHER.","If you do not need the packaged-compatibility path, unset the launcher flag."],"tags":["cli","windows","packaged-build","launcher","orchestration","environment"],"backgroundTag":null,"analyzedSha":"1136503c6a231a16dce8f921f6fadb63d181e8db","analyzedAt":"2026-08-12T23:15:58.167Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}