paperclipai/paperclip · error · Error
Working directory is not a directory
Error message
Working directory is not a directory: "${cwd}" What it means
Error "Working directory is not a directory: "${cwd}"" thrown in paperclipai/paperclip.
Solutions
- Point the working directory at a directory, not a file.
When it happens
Trigger: Thrown at packages/adapter-utils/src/server-utils.ts:2523 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/7175a170c18c1213.
Report an issue: GitHub.
Appendix: source
Thrown at packages/adapter-utils/src/server-utils.ts:3514
}
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,
args: spawnTarget.args,
cwd: process.cwd(),
cleanup: spawnTarget.cleanup,
};
}
View on GitHub (pinned to 3f1d897a7c)