{"record":{"id":"530d982274d1f16d","repo":"paperclipai/paperclip","slug":"pass-from-worktree-or-from-config-from-ins","errorCode":null,"errorMessage":"Pass --from <worktree> or --from-config/--from-instance explicitly so the reseed source is unambiguous.","messagePattern":"Pass --from <worktree> or --from-config/--from-instance explicitly so the reseed source is unambiguous\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"cli/src/commands/worktree.ts","lineNumber":883,"sourceCode":"    return {\n      configPath: endpoint.configPath,\n      label: endpoint.label,\n    };\n  }\n\n  if (hasExplicitConfigSource) {\n    const configPath = resolveSourceConfigPath({\n      fromConfig: fromConfig ?? undefined,\n      fromDataDir: fromDataDir ?? undefined,\n      fromInstance: fromInstance ?? undefined,\n    });\n    return {\n      configPath,\n      label: configPath,\n    };\n  }\n\n  throw new Error(\n    \"Pass --from <worktree> or --from-config/--from-instance explicitly so the reseed source is unambiguous.\",\n  );\n}\n\nfunction resolveWorktreeRepairSource(input: WorktreeRepairOptions): ResolvedWorktreeReseedSource {\n  const fromConfig = nonEmpty(input.fromConfig);\n  const fromDataDir = nonEmpty(input.fromDataDir);\n  const fromInstance = nonEmpty(input.fromInstance) ?? \"default\";\n  const configPath = resolveSourceConfigPath({\n    fromConfig: fromConfig ?? undefined,\n    fromDataDir: fromDataDir ?? undefined,\n    fromInstance,\n  });\n  return {\n    configPath,\n    label: configPath,\n  };\n}","sourceCodeStart":865,"sourceCodeEnd":901,"githubUrl":"https://github.com/paperclipai/paperclip/blob/67001ec6eb96ae601aa27bc91d9b2415d665334a/cli/src/commands/worktree.ts#L865-L901","documentation":"Thrown by resolveWorktreeReseedSource when neither a worktree selector (--from) nor any explicit config source (--from-config/--from-data-dir/--from-instance) is provided. The reseed operation cannot guess which instance to copy from, so it requires an explicit source.","triggerScenarios":"Running `paperclipai worktree reseed` (or the ensureWorktreeSeeded path) with no source flags and no resolvable default; the pending marker exists but its sourceConfigPath is empty/invalid and no override flags were passed.","commonSituations":"User expects the CLI to auto-detect the primary instance but did not configure a default; pending marker corrupted; first-time reseed without knowing which instance holds the seed data.","solutions":["Pass `--from <worktree>` pointing at an existing worktree that has the source data.","Or pass `--from-config <path>`, `--from-data-dir <home>`, or `--from-instance <id>` to name the source instance explicitly.","If unsure of the source instance id, list instances under ~/.paperclip/instances to find one."],"exampleFix":"# before\npaperclipai worktree reseed\n# after\npaperclipai worktree reseed --from-instance default","handlingStrategy":"validation","validationCode":"function requireSourceFlag(opts: { from?: string; fromConfig?: string; fromDataDir?: string; fromInstance?: string }): void {\n  const any = nonEmpty(opts.from) || nonEmpty(opts.fromConfig) || nonEmpty(opts.fromDataDir) || nonEmpty(opts.fromInstance);\n  if (!any) throw new Error('Pass --from or --from-config/--from-instance.');\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Always pass a source flag in scripts.","Provide a configured default instance in shell rc.","List available instances before first reseed."],"tags":["worktree","reseed","cli-flags","missing-argument"],"backgroundTag":null,"analyzedSha":"67001ec6eb96ae601aa27bc91d9b2415d665334a","analyzedAt":"2026-08-12T12:05:45.408Z","schemaVersion":2},"datasetVersion":"2026-08-12T18:17:37.767Z"}