{"record":{"id":"5f252dc675d4f35d","repo":"paperclipai/paperclip","slug":"process-adapter-missing-command","errorCode":null,"errorMessage":"Process adapter missing command","messagePattern":"Process adapter missing command","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"server/src/adapters/process/execute.ts","lineNumber":19,"sourceCode":"import type { AdapterExecutionContext, AdapterExecutionResult } from \"../types.js\";\nimport {\n  asString,\n  asNumber,\n  asStringArray,\n  parseObject,\n  buildPaperclipEnv,\n  isForbiddenConfigEnvKey,\n  isPaperclipRuntimeEnvKey,\n  buildInvocationEnvForLogs,\n  ensurePathInEnv,\n  resolveCommandForLogs,\n  runChildProcess,\n} from \"../utils.js\";\n\nexport async function execute(ctx: AdapterExecutionContext): Promise<AdapterExecutionResult> {\n  const { runId, agent, config, onLog, onMeta, authToken } = ctx;\n  const command = asString(config.command, \"\");\n  if (!command) throw new Error(\"Process adapter missing command\");\n\n  const args = asStringArray(config.args);\n  const cwd = asString(config.cwd, process.cwd());\n  const envConfig = parseObject(config.env);\n  const env: Record<string, string> = {\n    ...buildPaperclipEnv(agent),\n  };\n  for (const [k, v] of Object.entries(envConfig)) {\n    if (typeof v !== \"string\") continue;\n    // Runtime PAPERCLIP_* always wins over config, and PAPERCLIP_API_KEY is\n    // never accepted from config — the harness-minted run token is the only\n    // source. Other PAPERCLIP_* keys Paperclip did not assign flow through.\n    if (isForbiddenConfigEnvKey(k)) continue;\n    if (isPaperclipRuntimeEnvKey(k) && k in env) continue;\n    env[k] = v;\n  }\n  env.PAPERCLIP_RUN_ID = runId;\n  if (authToken) env.PAPERCLIP_API_KEY = authToken;","sourceCodeStart":1,"sourceCodeEnd":37,"githubUrl":"https://github.com/paperclipai/paperclip/blob/120ae5428fa29bee300bcf806491cd4d965fbb7c/server/src/adapters/process/execute.ts#L1-L37","documentation":"Config guard in the process adapter's execute: asString(config.command, \"\") returned an empty string, i.e. the adapter config declares no command to spawn. Fails before any child process, env, or workspace setup is attempted.","triggerScenarios":"Thrown at server/src/adapters/process/execute.ts:19 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Set the command in the process adapter configuration before executing."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"120ae5428fa29bee300bcf806491cd4d965fbb7c","analyzedAt":"2026-08-18T22:49:45.177Z","contentChangedAt":"2026-08-18T22:49:45.177Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}