{"record":{"id":"48cbcf925865ca8f","repo":"ruvnet/ruflo","slug":"checkpoint-not-found-checkpointid","errorCode":null,"errorMessage":"Checkpoint not found: ${checkpointId}","messagePattern":"Checkpoint not found: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"v3/@claude-flow/integration/src/long-running-worker.ts","lineNumber":455,"sourceCode":"      checkpointId: checkpoint.id,\n      sequence: checkpoint.sequence,\n      progress: checkpoint.progress,\n    });\n\n    return checkpoint;\n  }\n\n  /**\n   * Resume execution from a checkpoint\n   *\n   * @param checkpointId - Checkpoint ID to resume from\n   * @returns Agent output with results\n   */\n  async resumeFromCheckpoint(checkpointId: string): Promise<AgentOutput> {\n    const checkpoint = await this.storage.load(checkpointId);\n\n    if (!checkpoint) {\n      throw new Error(`Checkpoint not found: ${checkpointId}`);\n    }\n\n    this.emit('resuming-from-checkpoint', {\n      workerId: this.id,\n      checkpointId,\n      taskId: checkpoint.taskId,\n      progress: checkpoint.progress,\n    });\n\n    // Restore state\n    this.currentState = { ...checkpoint.state };\n    this.checkpointSequence = checkpoint.sequence;\n    this.checkpoints = await this.storage.list(checkpoint.taskId, this.id);\n\n    // Create a synthetic task from checkpoint\n    const resumeTask: Task = {\n      id: checkpoint.taskId,\n      type: 'resume',","sourceCodeStart":437,"sourceCodeEnd":473,"githubUrl":"https://github.com/ruvnet/ruflo/blob/fa13ee4ad60ac2090b1480656eb233521790d640/v3/@claude-flow/integration/src/long-running-worker.ts#L437-L473","documentation":"Thrown by LongRunningWorker#resumeFromCheckpoint (v3/@claude-flow/integration/src/long-running-worker.ts:455) when storage.load(checkpointId) resolves to null/undefined — the checkpoint store has no entry with that id. Ids look like `cp_${workerId}_${taskId}_${sequence}`, so a mismatch in any component yields not-found.","triggerScenarios":"Resuming with an id from a different worker or task; resuming after the checkpoint store was cleared (in-memory storage lost on restart, expired entries in a TTL store); typos or truncated ids (very long ids clipped in logs); sequence numbers shifting after a restart reset checkpointSequence.","commonSituations":"Process restarted expecting durable checkpoints but storage is in-memory; resuming from a persisted job spec after the store rotated; multi-instance deployments where the checkpoint lives on another instance's storage.","solutions":["List available checkpoints (via the storage layer / any list API) and match by taskId+workerId to recover the correct id before resuming.","Use a durable checkpoint storage backend when resuming across process restarts, and verify the id exists right before resume.","Treat this error as 'restart task from scratch': catch it and fall back to executing the task normally.","Persist the last checkpoint id at task-submission time so the resume path never guesses."],"exampleFix":"// before\nconst out = await worker.resumeFromCheckpoint(lastKnownId); // may be gone\n\n// after\nconst cp = await worker.storage.load(lastKnownId);\nif (!cp) {\n  // no checkpoint survived: re-run the task from the beginning\n  out = await worker.execute(task);\n} else {\n  out = await worker.resumeFromCheckpoint(lastKnownId);\n}","handlingStrategy":"validation","validationCode":"const cp = await worker.storage.load(checkpointId);\nif (!cp) {\n  // fall back to fresh execution\n  return worker.execute(task);\n}\nreturn worker.resumeFromCheckpoint(checkpointId);","typeGuard":"async function checkpointExists(storage: { load(id: string): Promise<Checkpoint | null> }, id: string): Promise<boolean> {\n  return (await storage.load(id)) != null;\n}","tryCatchPattern":"try {\n  return await worker.resumeFromCheckpoint(id);\n} catch (e) {\n  if (/^Checkpoint not found:/.test((e as Error).message)) {\n    return worker.execute(task); // restart from scratch\n  }\n  throw e;\n}","preventionTips":["Persist the last checkpoint id durably when the task is submitted.","Use durable checkpoint storage when resuming across process restarts.","Verify ids (workerId + taskId + sequence) match the instance you resume on."],"tags":["checkpointing","not-found","long-running-worker","recovery"],"backgroundTag":"checkpoint-not-found","analyzedSha":"fa13ee4ad60ac2090b1480656eb233521790d640","analyzedAt":"2026-08-18T21:34:22.708Z","schemaVersion":2},"datasetVersion":"2026-08-22T04:17:13.399Z"}