paperclipai/paperclip · error · Error
Unsupported seed mode "${seedMode}". Expected one of: minima
Error message
Unsupported seed mode "${seedMode}". Expected one of: minimal, full. What it means
Thrown at the top of runWorktreeInit when opts.seedMode fails the isWorktreeSeedMode() type guard. Only two seed modes are supported: "minimal" (schema + minimal reference data) and "full" (complete database clone). The guard rejects any other string before any filesystem or DB work begins, so it is a pure input-validation failure.
Source
Thrown at cli/src/commands/worktree.ts:1627
await releaseLock();
}
}
export function resolveWorktreeSeedBackupEngine(seedPlan: WorktreeSeedPlan): "auto" | "javascript" {
return seedPlan.excludedTables.length === 0 && Object.keys(seedPlan.nullifyColumns).length === 0
? "auto"
: "javascript";
}
async function runWorktreeInit(opts: WorktreeInitOptions): Promise<void> {
const cwd = process.cwd();
const worktreeName = resolveSuggestedWorktreeName(
cwd,
opts.name ?? detectGitBranchName(cwd) ?? undefined,
);
const seedMode = opts.seedMode ?? "minimal";
if (!isWorktreeSeedMode(seedMode)) {
throw new Error(`Unsupported seed mode "${seedMode}". Expected one of: minimal, full.`);
}
const instanceId = sanitizeWorktreeInstanceId(opts.instance ?? worktreeName);
const paths = resolveWorktreeLocalPaths({
cwd,
homeDir: resolveWorktreeHome(opts.home),
instanceId,
});
const branding = {
name: opts.name ?? worktreeName,
color: opts.color ?? generateWorktreeColor(),
};
const sourceConfigPath = resolveSourceConfigPath(opts);
const sourceConfig = existsSync(sourceConfigPath) ? readConfig(sourceConfigPath) : null;
if ((existsSync(paths.configPath) || existsSync(paths.instanceRoot)) && !opts.force) {
throw new Error(
`Worktree config already exists at ${paths.configPath} or instance data exists at ${paths.instanceRoot}. Re-run with --force to replace it.`,
);View on GitHub (pinned to 67001ec6eb)
Solutions
- Use exactly one of the supported values: `--seed-mode minimal` or `--seed-mode full`.
- Omit the flag entirely — the default is `minimal` (opts.seedMode ?? "minimal").
- If calling runWorktreeInit programmatically, type the option as `type SeedMode = "minimal" | "full"` and validate before the call.
Example fix
// before paperclipai worktree:init --seed-mode minimum // after paperclipai worktree:init --seed-mode minimal
Defensive patterns
Strategy: type-guard
Validate before calling
const SEED_MODES = ["minimal", "full"] as const;
type SeedMode = (typeof SEED_MODES)[number];
function isSeedMode(v: unknown): v is SeedMode {
return typeof v === "string" && (SEED_MODES as readonly string[]).includes(v);
}
if (opts.seedMode != null && !isSeedMode(opts.seedMode)) {
throw new Error(`Bad seed mode; expected ${SEED_MODES.join(", ")}`);
} Type guard
function isWorktreeSeedMode(v: string): v is "minimal" | "full" {
return v === "minimal" || v === "full";
} Prevention
- Type the option as the literal union "minimal" | "full" at the API boundary.
- Validate CLI input against the allowed set before forwarding to runWorktreeInit.
- Omit --seed-mode to accept the safe 'minimal' default.
When it happens
Trigger: Passing `--seed-mode` with a typo or unsupported value (e.g. "minimum", "all", "complete", "partial"); a wrapper script or programmatic caller passing an arbitrary seedMode string; CLI flag value sourced from an env var with an unexpected value.
Common situations: Misremembered flag value; copied an outdated command from docs; tab-completion or shell history inserted a wrong word.
Related errors
- Worktree config already exists at ${paths.configPath} or ins
- Cannot seed worktree database because source config was not
- Worktree selector cannot be empty.
- Could not resolve worktree "${selector}". Use a path, a list
- No Paperclip worktrees were found. Run `paperclipai worktree
AI-assisted analysis of paperclipai/paperclip@67001ec6eb (2026-08-12).
Data as JSON: /api/errors/cfc0c74d51e4f5b9.
Report an issue: GitHub.