{"record":{"id":"7175a170c18c1213","repo":"paperclipai/paperclip","slug":"working-directory-is-not-a-directory-cwd","errorCode":null,"errorMessage":"Working directory is not a directory: \"${cwd}\"","messagePattern":"Working directory is not a directory: \"(.+?)\"","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/adapter-utils/src/server-utils.ts","lineNumber":3514,"sourceCode":"}\n\nasync function resolveSpawnTarget(\n  command: string,\n  args: string[],\n  cwd: string,\n  env: NodeJS.ProcessEnv,\n  options: {\n    remoteExecution?: RemoteExecutionSpec | null;\n    remoteEnv?: Record<string, string> | null;\n    localProcessSandbox?: LocalProcessSandboxOptions | null;\n  } = {},\n): Promise<SpawnTarget> {\n  const remote = options.remoteExecution ?? null;\n  if (remote) {\n    const sshResolved = await resolveCommandPath(\"ssh\", process.cwd(), env);\n    if (!sshResolved) {\n      throw new Error('Command not found in PATH: \"ssh\"');\n    }\n    const spawnTarget = await buildSshSpawnTarget({\n      spec: remote,\n      command,\n      args,\n      env: Object.fromEntries(\n        Object.entries(options.remoteEnv ?? {}).filter(\n          (entry): entry is [string, string] => typeof entry[1] === \"string\",\n        ),\n      ),\n    });\n    return {\n      command: sshResolved,\n      args: spawnTarget.args,\n      cwd: process.cwd(),\n      cleanup: spawnTarget.cleanup,\n    };\n  }\n","sourceCodeStart":3496,"sourceCodeEnd":3532,"githubUrl":"https://github.com/paperclipai/paperclip/blob/3f1d897a7c018d76563a21c6e39c3c9b03933622/packages/adapter-utils/src/server-utils.ts#L3496-L3532","documentation":"Error \"Working directory is not a directory: \"${cwd}\"\" thrown in paperclipai/paperclip.","triggerScenarios":"Thrown at packages/adapter-utils/src/server-utils.ts:2523 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Point the working directory at a directory, not a file."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"3f1d897a7c018d76563a21c6e39c3c9b03933622","analyzedAt":"2026-08-18T22:49:45.177Z","contentChangedAt":"2026-08-18T22:49:45.177Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}