paperclipai/paperclip · error · Error

Working directory must be an absolute path

Error message

Working directory must be an absolute path: "${cwd}"

What it means

Error "Working directory must be an absolute path: "${cwd}"" thrown in paperclipai/paperclip.

Solutions

  1. Use an absolute path for the working directory.

When it happens

Trigger: Thrown at packages/adapter-utils/src/server-utils.ts:2517 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of paperclipai/paperclip@3f1d897a7c (2026-08-18). Data as JSON: /api/errors/2e483745f7ffc98e. Report an issue: GitHub.

Appendix: source

Thrown at packages/adapter-utils/src/server-utils.ts:3508

}

function resolveWindowsCmdShell(env: NodeJS.ProcessEnv): string {
  const fallbackRoot =
    env.SystemRoot || process.env.SystemRoot || "C:\\Windows";
  return path.join(fallbackRoot, "System32", "cmd.exe");
}

async function resolveSpawnTarget(
  command: string,
  args: string[],
  cwd: string,
  env: NodeJS.ProcessEnv,
  options: {
    remoteExecution?: RemoteExecutionSpec | null;
    remoteEnv?: Record<string, string> | null;
    localProcessSandbox?: LocalProcessSandboxOptions | null;
  } = {},
): Promise<SpawnTarget> {
  const remote = options.remoteExecution ?? null;
  if (remote) {
    const sshResolved = await resolveCommandPath("ssh", process.cwd(), env);
    if (!sshResolved) {
      throw new Error('Command not found in PATH: "ssh"');
    }
    const spawnTarget = await buildSshSpawnTarget({
      spec: remote,
      command,
      args,
      env: Object.fromEntries(
        Object.entries(options.remoteEnv ?? {}).filter(
          (entry): entry is [string, string] => typeof entry[1] === "string",
        ),
      ),
    });
    return {
      command: sshResolved,

View on GitHub (pinned to 3f1d897a7c)