paperclipai/paperclip · error · Error

Failed to create a pending worktree seed manifest.

Error message

Failed to create a pending worktree seed manifest.

What it means

When no verified seed and no compatible legacy database exists, ensureWorktreeSeeded calls markWorktreeSeedPending to write a fresh pending manifest and immediately re-reads it. If the re-read still returns null, the manifest that was just written is already gone — the write itself is atomic, so the disappearance is a concurrent deletion (or a marker directory that silently loses writes, e.g. broken storage).

Source

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

          status: "succeeded",
          state: "verified",
          snapshotAt: new Date().toISOString(),
          migrationRevision: legacyEvidence.migrationRevision,
          message: "Adopted an existing legacy worktree database after validating its migration journal and core schema.",
        });
        return { seeded: false, reason: "legacy_database" };
      }

      markWorktreeSeedPending({
        configPath,
        sourceConfigPath: registeredSeedSource.configPath,
        targetInstanceId: targetPaths.instanceId,
        seedMode: "minimal",
        diagnosticMessage: "No verified seed or compatible legacy database was found; provisioning is required.",
      });
      manifest = readWorktreeSeedManifest(configPath);
      if (!manifest) {
        throw new Error("Failed to create a pending worktree seed manifest.");
      }
    }
    if (
      manifest.source.configPath !== registeredSeedSource.configPath
      || manifest.source.instanceId !== registeredSeedSource.instanceId
    ) {
      markWorktreeSeedPending({
        configPath,
        sourceConfigPath: registeredSeedSource.configPath,
        targetInstanceId: manifest.targetInstanceId,
        seedMode: manifest.seedMode,
        diagnosticMessage: "Re-derived seed source diagnostics from the registered canonical source.",
      });
      manifest = readWorktreeSeedManifest(configPath)!;
    }
    canonicalSource = resolveCanonicalWorktreeSeedSource({
      registeredBaseWorkspaceCwd,
      explicitSourceConfigPath,

View on GitHub (pinned to a7e689b3c3)

Solutions

  1. Stop any concurrent cleanup/reset processes touching the worktree markers and retry ensureWorktreeSeeded
  2. Verify the markers directory is writable and persists (ls the manifest path right after a run)
  3. If storage is flaky, move the worktree config/marker dir to reliable local storage
Defensive patterns

Strategy: retry

Validate before calling

markWorktreeSeedPending({ configPath, sourceConfigPath, targetInstanceId, seedMode: 'minimal' });
if (!existsSync(resolveWorktreeSeedMarkerPaths(configPath).manifest)) {
  throw new Error('Marker directory is losing writes; check for concurrent cleanup or broken storage.');
}

Try / catch

Catch, confirm no cleanup process is deleting markers, then retry ensureWorktreeSeeded once; a repeat failure indicates filesystem trouble, not a seed bug.

Prevention

When it happens

Trigger: A cleanup or competing process deletes the marker file between markWorktreeSeedPending's write and the re-read; the markers directory is on a filesystem/mount where writes do not persist; heavy marker churn from racing seeds.

Common situations: Worktree cleanup racing first-time provisioning; a watchdog script that wipes marker files; read-only or flaky overlay mounts for the worktree config dir.

Related errors


AI-assisted analysis of paperclipai/paperclip@a7e689b3c3 (2026-08-21). Data as JSON: /api/errors/645c9f247f7f958e. Report an issue: GitHub.