paperclipai/paperclip · error · Error

Could not create working directory

Error message

Could not create working directory "${cwd}" on remote target${detail ? `: ${detail}` : "."}

What it means

Directory-creation failure on a remote target: creation was requested (createIfMissing) but the mkdir/test shell command exited non-zero — usually permissions or a missing parent path segment — with the remote stderr/stdout embedded as detail.

Solutions

  1. Create the working directory manually on the remote target, or fix the error in the detail.
  2. Check permissions on the remote parent directory.
Defensive patterns

Strategy: retry

When it happens

Trigger: Thrown at packages/adapter-utils/src/execution-target.ts:1061 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/75ca2566fe3f8f73. Report an issue: GitHub.

Appendix: source

Thrown at packages/adapter-utils/src/execution-target.ts:1111

      graceSec: 10,
    });
  } catch (err) {
    return {
      code,
      level: "warn",
      message: "Install command threw before completion.",
      detail: err instanceof Error ? err.message : String(err),
    };
  }
  const tail = (text: string) =>
    text.split(/\r?\n/).filter((line) => line.trim().length > 0).slice(-3).join(" | ").slice(0, 480);
  if (result.timedOut) {
    return {
      code,
      level: "warn",
      message: `Install command timed out: ${trimmed}`,
      detail: tail(result.stderr || result.stdout),
    };
  }
  if ((result.exitCode ?? 1) === 0) {
    return {
      code,
      level: "info",
      message: `Install command ran: ${trimmed}`,
      ...(tail(result.stdout) ? { detail: tail(result.stdout) } : {}),
    };
  }
  return {
    code,
    level: "warn",
    message: `Install command exited ${result.exitCode}: ${trimmed}`,
    detail: tail(result.stderr || result.stdout),
  };
}

export async function readAdapterExecutionTargetHomeDir(

View on GitHub (pinned to 3f1d897a7c)