paperclipai/paperclip · error

Target config does not look like a worktree-local Paperclip…

Error message

Target config ${input.configPath} does not look like a worktree-local Paperclip instance. Expected PAPERCLIP_HOME and PAPERCLIP_INSTANCE_ID in the adjacent .env.

What it means

Error "Target config ${input.configPath} does not look like a worktree-local Paperclip instance. Expected PAPERCLIP_HOME and PAPERCLIP_INSTANCE_ID in the adjacent .env." thrown in paperclipai/paperclip.

Solutions

  1. Point --config at a worktree-local Paperclip instance whose adjacent .env defines PAPERCLIP_HOME and PAPERCLIP_INSTANCE_ID.
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at cli/src/commands/worktree.ts:912 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of paperclipai/paperclip@01ad858492 (2026-08-18). Data as JSON: /api/errors/8e5c078e47f5e791. Report an issue: GitHub.

Appendix: source

Thrown at cli/src/commands/worktree.ts:928

    fromDataDir: fromDataDir ?? undefined,
    fromInstance,
  });
  return {
    configPath,
    label: configPath,
  };
}

export function resolveWorktreeReseedTargetPaths(input: {
  configPath: string;
  rootPath: string;
}): WorktreeLocalPaths {
  const envEntries = readPaperclipEnvEntries(resolvePaperclipEnvFile(input.configPath));
  const homeDir = nonEmpty(envEntries.PAPERCLIP_HOME);
  const instanceId = nonEmpty(envEntries.PAPERCLIP_INSTANCE_ID);

  if (!homeDir || !instanceId) {
    throw new Error(
      `Target config ${input.configPath} does not look like a worktree-local Paperclip instance. Expected PAPERCLIP_HOME and PAPERCLIP_INSTANCE_ID in the adjacent .env.`,
    );
  }

  return resolveWorktreeLocalPaths({
    cwd: input.rootPath,
    homeDir,
    instanceId,
  });
}

function resolveExistingGitWorktree(selector: string, cwd: string): MergeSourceChoice | null {
  const trimmed = selector.trim();
  if (trimmed.length === 0) return null;

  const directPath = path.resolve(trimmed);
  if (existsSync(directPath)) {
    return {

View on GitHub (pinned to 01ad858492)