{"record":{"id":"a525b9d55c3a969e","repo":"paperclipai/paperclip","slug":"invalid-worktree-seed-pending-marker-at-filepath-a525b9","errorCode":null,"errorMessage":"Invalid worktree seed-pending marker at ${filePath}.","messagePattern":"Invalid worktree seed-pending marker at (.+?)\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"cli/src/commands/worktree.ts","lineNumber":2005,"sourceCode":"function readLegacyWorktreeSeedPendingMarker(filePath: string): LegacyWorktreeSeedPendingMarker {\n  let parsed: unknown;\n  try {\n    parsed = JSON.parse(readFileSync(filePath, \"utf8\"));\n  } catch (error) {\n    throw new Error(\n      `Invalid worktree seed-pending marker at ${filePath}: ${error instanceof Error ? error.message : String(error)}`,\n    );\n  }\n\n  if (\n    !parsed\n    || typeof parsed !== \"object\"\n    || (parsed as { version?: unknown }).version !== 1\n    || (parsed as { state?: unknown }).state !== \"pending\"\n    || typeof (parsed as { sourceConfigPath?: unknown }).sourceConfigPath !== \"string\"\n    || !(parsed as { sourceConfigPath: string }).sourceConfigPath.trim()\n  ) {\n    throw new Error(`Invalid worktree seed-pending marker at ${filePath}.`);\n  }\n\n  return parsed as LegacyWorktreeSeedPendingMarker;\n}\n\nconst WORKTREE_SEED_LOCK_POLL_MS = 50;\nconst WORKTREE_SEED_LOCK_MALFORMED_STALE_MS = 60_000;\n\ntype WorktreeSeedLockOwner = {\n  version: 1;\n  pid: number;\n  token: string;\n  createdAt: string;\n};\n\nfunction processIsAlive(pid: number): boolean {\n  try {\n    process.kill(pid, 0);","sourceCodeStart":1987,"sourceCodeEnd":2023,"githubUrl":"https://github.com/paperclipai/paperclip/blob/01ad8584922b5d85292b1723cae71fa0d9b07a19/cli/src/commands/worktree.ts#L1987-L2023","documentation":"The legacy seed-pending marker file failed JSON parsing or shape validation (not an object with version 1, state 'pending', and a sourceConfigPath string); the marker is corrupt and cannot be interpreted as a pending seed.","triggerScenarios":"Thrown at cli/src/commands/worktree.ts:1452 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Inspect the seed-pending marker at ${filePath} and correct its contents.","Remove the marker file and retry the seed operation."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"01ad8584922b5d85292b1723cae71fa0d9b07a19","analyzedAt":"2026-08-21T17:58:32.592Z","contentChangedAt":"2026-08-21T17:58:32.592Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}