{"record":{"id":"b8f5befe07e4c19e","repo":"Yeachan-Heo/oh-my-codex","slug":"autoresearch-resume-manifest-missing","errorCode":"autoresearch_resume_manifest_missing","errorMessage":"autoresearch_resume_manifest_missing:${runId}","messagePattern":"autoresearch_resume_manifest_missing:(.+?)","errorType":"error_code","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"src/autoresearch/runtime.ts","lineNumber":757,"sourceCode":"      stdio: 'ignore',\n    });\n  } catch {\n    // Non-fatal: if commit fails the reset-safe check will catch it with\n    // a clear diagnostic.\n  }\n\n  return {\n    ...contract,\n    missionDir,\n    missionFile,\n    sandboxFile,\n  };\n}\n\nexport async function loadAutoresearchRunManifest(projectRoot: string, runId: string): Promise<AutoresearchRunManifest> {\n  const manifestFile = join(projectRoot, '.omx', 'logs', 'autoresearch', runId, 'manifest.json');\n  if (!existsSync(manifestFile)) {\n    throw new Error(`autoresearch_resume_manifest_missing:${runId}`);\n  }\n  return readJsonFile<AutoresearchRunManifest>(manifestFile);\n}\n\nasync function writeRunManifest(manifest: AutoresearchRunManifest): Promise<void> {\n  manifest.updated_at = nowIso();\n  await writeJsonFile(manifest.manifest_file, manifest);\n}\n\nasync function writeInstructionsFile(contract: AutoresearchMissionContract, manifest: AutoresearchRunManifest): Promise<void> {\n  const instructionContext = await buildAutoresearchInstructionContext(manifest);\n  await writeFile(\n    manifest.instructions_file,\n    `${buildAutoresearchInstructions(contract, {\n      runId: manifest.run_id,\n      iteration: manifest.iteration + 1,\n      baselineCommit: manifest.baseline_commit,\n      lastKeptCommit: manifest.last_kept_commit,","sourceCodeStart":739,"sourceCodeEnd":775,"githubUrl":"https://github.com/Yeachan-Heo/oh-my-codex/blob/3ad79a8a6fe6e95fdbb8c00e40716fffe4011ce2/src/autoresearch/runtime.ts#L739-L775","documentation":"loadAutoresearchRunManifest throws (code autoresearch_resume_manifest_missing) when the run's manifest.json does not exist at <projectRoot>/.omx/logs/autoresearch/<runId>/manifest.json. Resume and manifest-inspection APIs require that the run was previously registered with a persisted manifest.","triggerScenarios":"Calling resumeAutoresearchRuntime or any manifest accessor (finalManifest, keptManifest, beforeDiscardManifest, initialManifest) with a runId that has no manifest: mistyped ID, run artifacts deleted, or a run from a different repository root.","commonSituations":"Copy-pasting a truncated or wrong run ID, cleaning .omx/logs with gitignore+clean, running resume in the wrong clone/repo root, or the run directory being on a machine other than where the run started.","solutions":["List .omx/logs/autoresearch/ in the project root and confirm the exact runId directory exists","If the ID was mistyped, use the correct runId from the run listing","If the artifacts were deleted, the run cannot be resumed — start a new autoresearch run","Ensure you run resume from the same repository root where the run was created"],"exampleFix":"# before\nawait resumeAutoresearchRuntime(repoRoot, 'run-123'); // throws: manifest missing\n# after\nconst runId = fs.readdirSync(join(repoRoot, '.omx/logs/autoresearch'))[0];\nawait resumeAutoresearchRuntime(repoRoot, runId);","handlingStrategy":"validation","validationCode":"import { existsSync } from 'node:fs';\nimport { join } from 'node:path';\nfunction manifestExists(repoRoot: string, runId: string): boolean {\n  return existsSync(join(repoRoot, '.omx', 'logs', 'autoresearch', runId, 'manifest.json'));\n}","typeGuard":null,"tryCatchPattern":"try { await resumeAutoresearchRuntime(repoRoot, runId); }\ncatch (e) { if (e instanceof Error && e.message.startsWith('autoresearch_resume_manifest_missing')) { /* list .omx/logs/autoresearch to find valid runIds */ } throw e; }","preventionTips":["Copy runIds from the run listing output, never hand-typed","Do not git clean/delete .omx/logs for runs you may need to resume","Run resume from the same repo root where the run started"],"tags":["autoresearch","manifest","missing-file","run-id"],"backgroundTag":"missing-workflow-state-file","analyzedSha":"3ad79a8a6fe6e95fdbb8c00e40716fffe4011ce2","analyzedAt":"2026-08-27T22:18:39.783Z","schemaVersion":2},"datasetVersion":"2026-08-28T00:17:15.603Z"}