paperclipai/paperclip · error · Error
Worktree seed manifest does not exist at ${markers.manifest}
Error message
Worktree seed manifest does not exist at ${markers.manifest}. What it means
updateWorktreeSeedManifest() records each phase transition (started/succeeded/failed) into the existing manifest; it refuses to invent one. readWorktreeSeedManifest returned null, meaning no manifest file exists at the resolved marker path — either it was never created (markWorktreeSeedPending must run first) or it disappeared mid-seed (concurrent cleanup), or the wrong configPath resolved to different marker paths.
Source
Thrown at cli/src/commands/worktree.ts:2000
// New manifests are authoritative. Legacy files are removed so no caller can
// mistake a stale binary marker for current verified seed state.
rmSync(markers.complete, { force: true });
rmSync(markers.pending, { force: true });
}
function updateWorktreeSeedManifest(input: {
configPath: string;
phase: WorktreeSeedPhase;
status: "started" | "succeeded" | "failed";
state?: WorktreeSeedManifest["state"];
message?: string;
snapshotAt?: string | null;
migrationRevision?: string | null;
now?: Date;
}): WorktreeSeedManifest {
const markers = resolveWorktreeSeedMarkerPaths(input.configPath);
const current = readWorktreeSeedManifest(input.configPath);
if (!current) throw new Error(`Worktree seed manifest does not exist at ${markers.manifest}.`);
const at = (input.now ?? new Date()).toISOString();
const nextState = input.state ?? current.state;
const diagnostic = {
phase: input.phase,
status: input.status,
at,
...(input.message
? { message: input.message.slice(0, WORKTREE_SEED_DIAGNOSTIC_MESSAGE_LIMIT) }
: {}),
};
const next: WorktreeSeedManifest = {
...current,
phase: input.phase,
state: nextState,
snapshotAt: input.snapshotAt === undefined ? current.snapshotAt : input.snapshotAt,
migrationRevision:
input.migrationRevision === undefined ? current.migrationRevision : input.migrationRevision,
startedAt: current.startedAt ?? (input.status === "started" ? at : null),View on GitHub (pinned to a7e689b3c3)
Solutions
- Run the full ensureWorktreeSeeded flow (it creates the pending manifest before updating) instead of calling update directly
- Make sure no cleanup/deletion runs against the worktree markers while a seed is in progress
- Verify the configPath passed to the seed matches the worktree's actual config location
Defensive patterns
Strategy: validation
Validate before calling
import { existsSync } from 'node:fs';
import { resolveWorktreeSeedMarkerPaths, markWorktreeSeedPending } from './worktree-lib';
if (!existsSync(resolveWorktreeSeedMarkerPaths(configPath).manifest)) {
markWorktreeSeedPending({ configPath, sourceConfigPath, targetInstanceId, seedMode: 'minimal' });
}
updateWorktreeSeedManifest({ configPath, phase, status }); Prevention
- Always create the pending manifest before recording phase transitions
- Keep cleanup processes away from marker files while a seed runs
When it happens
Trigger: Calling updateWorktreeSeedManifest before markWorktreeSeedPending ever created the manifest; another process deleting the marker files while a seed runs; passing a configPath whose resolved marker directory differs from the one the manifest was written under.
Common situations: A cleanup command racing an in-flight seed on the same worktree; invoking seed helpers out of order in custom automation; moving/renaming the worktree config so marker paths change.
Related errors
- Invalid worktree seed manifest at ${manifestPath}: ${error i
- Invalid worktree seed manifest at ${manifestPath}.
- Worktree seed manifest target instance does not match the re
- Worktree seed source diagnostics changed while waiting for t
- Failed to create a pending worktree seed manifest.
AI-assisted analysis of paperclipai/paperclip@a7e689b3c3 (2026-08-21).
Data as JSON: /api/errors/4884e4265b112e61.
Report an issue: GitHub.