paperclipai/paperclip · error · Error
Source config not found at ${source.configPath}.
Error message
Source config not found at ${source.configPath}. What it means
Thrown by runWorktreeReseed when existsSync(source.configPath) is false, checked BEFORE attempting readConfig. The source path comes from resolveWorktreeReseedSource, which resolves --from (worktree selector), --from-config (literal path), or --from-data-dir + --from-instance (~/.paperclip/instances/<id>/config.json). This is an early, clear 'file does not exist' guard distinct from the readConfig-based check at 3422.
Source
Thrown at cli/src/commands/worktree.ts:3413
}
}
async function runWorktreeReseed(opts: WorktreeReseedOptions): Promise<void> {
const seedMode = opts.seedMode ?? "full";
if (!isWorktreeSeedMode(seedMode)) {
throw new Error(`Unsupported seed mode "${seedMode}". Expected one of: minimal, full.`);
}
const targetEndpoint = opts.to
? resolveWorktreeEndpointFromSelector(opts.to, { allowCurrent: true })
: resolveCurrentWorktreeEndpoint();
const source = resolveWorktreeReseedSource(opts);
if (path.resolve(source.configPath) === path.resolve(targetEndpoint.configPath)) {
throw new Error("Source and target Paperclip configs are the same. Choose different --from/--to values.");
}
if (!existsSync(source.configPath)) {
throw new Error(`Source config not found at ${source.configPath}.`);
}
const targetConfig = readConfig(targetEndpoint.configPath);
if (!targetConfig) {
throw new Error(`Target config not found at ${targetEndpoint.configPath}.`);
}
const sourceConfig = readConfig(source.configPath);
if (!sourceConfig) {
throw new Error(`Source config not found at ${source.configPath}.`);
}
const targetPaths = resolveWorktreeReseedTargetPaths({
configPath: targetEndpoint.configPath,
rootPath: targetEndpoint.rootPath,
});
const runningTargetPid = resolveRunningEmbeddedPostgresPid(targetConfig);
if (runningTargetPid && !opts.allowLiveTarget) {
throw new Error(View on GitHub (pinned to 67001ec6eb)
Solutions
- Verify the path with `ls <source.configPath>`; fix the typo or use an absolute path.
- If deriving from instance id, run `paperclipai worktree init` or the primary instance setup first so ~/.paperclip/instances/<id>/config.json exists.
- Use --from <worktree-selector> pointing at a worktree that has already been initialized.
Example fix
// before paperclipai worktree reseed --from-config ~/wrong.json --to current // after paperclipai worktree reseed --from-config ~/.paperclip/instances/default/config.json --to current
Defensive patterns
Strategy: validation
Validate before calling
import fs from "node:fs";
function ensureSourceConfigExists(sourceConfigPath: string): void {
if (!fs.existsSync(sourceConfigPath)) {
throw new Error(`Source config not found at ${sourceConfigPath}.`);
}
} Prevention
- Always pass --from-config as an absolute path to avoid cwd-relative surprises.
- When deriving from --from-instance, confirm ~/.paperclip/instances/<id>/config.json exists first.
- Run `ls` on the source config path in scripts before invoking reseed.
When it happens
Trigger: Calling reseed with --from-config /path/that/does/not/exist, or --from-instance <id> where ~/.paperclip/instances/<id>/config.json was never created, or --from <worktree> whose .paperclip/config.json is missing.
Common situations: A typo in the --from-config path. Or pointing at an instance id that was cleaned up. Or a fresh machine where ~/.paperclip has no 'default' instance yet.
Related errors
- Target config not found at ${targetEndpoint.configPath}.
- Target config ${input.configPath} does not look like a workt
- Source and target Paperclip configs are the same. Pass --fro
- Cannot seed worktree database because source config was not
- Source and target Paperclip configs are the same. Choose dif
AI-assisted analysis of paperclipai/paperclip@67001ec6eb (2026-08-12).
Data as JSON: /api/errors/f067251faf886158.
Report an issue: GitHub.