paperclipai/paperclip · error · Error
Worktree seed manifest source path does not match the regist
Error message
Worktree seed manifest source path does not match the registered canonical source.
What it means
The manifest's diagnostic configPath must both resolve (path.resolve) and canonicalize (realpath + symlink/file checks via canonicalRegularFile) to exactly the registered source config path. Either the manifest records a different path than the one the registration resolves to, or the recorded path is a non-canonical alias of it.
Source
Thrown at packages/shared/src/worktree-seed-source.ts:218
* never select the returned source.
*/
export function resolveCanonicalWorktreeSeedSource(input: RegisteredWorktreeSeedSourceInput & {
manifestSource: WorktreeSeedSourceDiagnostic | null | undefined;
manifestTargetInstanceId?: unknown;
}): CanonicalWorktreeSeedSource {
const registered = resolveRegisteredWorktreeSeedSource(input);
const diagnosticPath = typeof input.manifestSource?.configPath === "string"
? input.manifestSource.configPath.trim()
: "";
if (!diagnosticPath) {
throw new Error("Worktree seed manifest is missing source path diagnostics.");
}
const canonicalDiagnosticPath = canonicalRegularFile(
diagnosticPath,
"Worktree seed manifest source diagnostic",
);
if (path.resolve(diagnosticPath) !== registered.configPath || canonicalDiagnosticPath !== registered.configPath) {
throw new Error("Worktree seed manifest source path does not match the registered canonical source.");
}
if (input.manifestSource?.instanceId !== registered.instanceId) {
throw new Error("Worktree seed manifest source instance does not match the registered source instance.");
}
if (input.manifestTargetInstanceId !== registered.targetInstanceId) {
throw new Error("Worktree seed manifest target instance does not match the registered target instance.");
}
return registered;
}
View on GitHub (pinned to a7e689b3c3)
Solutions
- Compare `manifest.source.configPath` with `realpath <base>/.paperclip/config.json` and update the manifest to the canonical value.
- Regenerate the seed manifest after moving or re-registering the base workspace.
- Never write alias paths into manifests — store `realpath` output.
Example fix
# before: manifest holds a stale path
"source": { "configPath": "/home/me/old-loc/base/.paperclip/config.json" }
# after: regenerate or edit to the current canonical path
"source": { "configPath": "$(realpath ~/code/base/.paperclip/config.json)" } Defensive patterns
Strategy: validation
Validate before calling
import { realpathSync } from "node:fs";
import path from "node:path";
const registered = path.join(baseWorkspaceCwd, ".paperclip", "config.json");
const recorded = manifest.source.configPath;
if (path.resolve(recorded) !== registered || realpathSync(recorded) !== registered) {
throw new Error("manifest source path is stale — regenerate the manifest");
} Prevention
- Store realpath output when writing manifests; never raw or aliased paths.
- Regenerate manifests after moving or re-registering a workspace.
- Include manifest generation in the same commit/step as registration changes.
When it happens
Trigger: manifestSource.configPath differing from `<base>/.paperclip/config.json` after the workspace moved; a manifest recording a symlinked alias (e.g. /tmp/... instead of /private/tmp/...); stale manifests from before a re-registration.
Common situations: Workspace moved/re-registered after the manifest was written; macOS /tmp aliasing baked into manifests; manifests shared between machines with different home paths; symlinked `.paperclip` at manifest-creation time.
Related errors
- Worktree seed manifest source instance does not match the re
- Worktree seed manifest target instance does not match the re
- ${label} must be a canonical path and cannot use a symlink a
- Registered base project workspace must be canonical and cann
- Worktree seed manifest is missing source path diagnostics.
AI-assisted analysis of paperclipai/paperclip@a7e689b3c3 (2026-08-21).
Data as JSON: /api/errors/9e0be3da0f5885f3.
Report an issue: GitHub.