{"record":{"id":"9394847d92824cbf","repo":"Yeachan-Heo/oh-my-codex","slug":"no-mission-summary-found-at-summarypath","errorCode":null,"errorMessage":"No mission summary found at ${summaryPath}.","messagePattern":"No mission summary found at (.+?)\\.","errorType":"exception","errorClass":"MissionCommandError","httpStatus":null,"severity":"error","filePath":"src/cli/mission.ts","lineNumber":290,"sourceCode":"function resolveMissionPaths(cwd: string, parsed: ParsedMissionArgs): MissionPaths {\n  const looksLikePath = parsed.file.includes(\"/\") || parsed.file.includes(\"\\\\\") || parsed.file.endsWith(\".md\") || parsed.file.endsWith(\".txt\");\n  const inputPath = isAbsolute(parsed.file) ? parsed.file : resolve(cwd, parsed.file);\n  const baseSlug = parsed.slug ?? ((parsed.action === \"status\" || parsed.action === \"mark\") && !looksLikePath ? parsed.file : slugify(basename(inputPath, extname(inputPath))));\n  const slug = slugify(baseSlug);\n  const missionRoot = join(omxRoot(cwd), \"missions\", slug);\n  const summaryPath = parsed.summaryPath\n    ? (isAbsolute(parsed.summaryPath) ? parsed.summaryPath : resolve(cwd, parsed.summaryPath))\n    : join(missionRoot, \"summary.json\");\n  const ledgerPath = join(missionRoot, \"ledger.jsonl\");\n  return { inputPath, slug, missionRoot, summaryPath, ledgerPath };\n}\n\nasync function readSummary(summaryPath: string): Promise<MissionSummary> {\n  let raw: string;\n  try {\n    raw = await readFile(summaryPath, \"utf-8\");\n  } catch {\n    throw new MissionCommandError(`No mission summary found at ${summaryPath}.`);\n  }\n  let summary: MissionSummary;\n  try {\n    summary = JSON.parse(raw) as MissionSummary;\n  } catch {\n    throw new MissionCommandError(`Invalid mission summary at ${summaryPath}.`);\n  }\n  if (summary.version !== 1 || !Array.isArray(summary.tasks)) {\n    throw new MissionCommandError(`Invalid mission summary at ${summaryPath}.`);\n  }\n  return summary;\n}\n\nfunction syncSummary(summary: MissionSummary, updates: Partial<Pick<MissionSummary, \"status\" | \"dry_run\" | \"continue_on_error\" | \"codex_args\">>): void {\n  Object.assign(summary, updates);\n  summary.counts = missionCounts(summary.tasks);\n}\n","sourceCodeStart":272,"sourceCodeEnd":308,"githubUrl":"https://github.com/Yeachan-Heo/oh-my-codex/blob/3ad79a8a6fe6e95fdbb8c00e40716fffe4011ce2/src/cli/mission.ts#L272-L308","documentation":"readSummary fails to read the summary file at summaryPath (readFile threw, typically ENOENT). This happens for status/mark/resume/rerun actions that operate on a previously run mission but no summary exists yet.","triggerScenarios":"Running `mission status <file>` (or mark/resume/rerun) before `mission run <file>` has produced a summary; wrong --summary path or slug derivation pointing at a nonexistent file; summary deleted.","commonSituations":"Fresh clone where missions haven't run; CI job checking status before the run step; renamed input file changing the derived slug/summary path.","solutions":["Run `mission run <file>` first to generate the summary","Verify the expected summary path (derived from the mission slug) exists","Keep the mission input filename stable so the slug/summary path stays consistent"],"exampleFix":"// before\nawait missionCommand(['status', 'mission.md'], options);\n// after\nawait missionCommand(['run', 'mission.md', '--dry-run'], options); // validate first, then run, then status","handlingStrategy":"try-catch","validationCode":"import { access } from 'node:fs/promises';\nawait access(summaryPath).catch(() => { throw new Error('run the mission first'); });","typeGuard":null,"tryCatchPattern":"try { await missionCommand(['status', file], opts); } catch (e) { if (e instanceof MissionCommandError && /No mission summary found/.test(e.message)) await missionCommand(['run', file], opts); else throw e; }","preventionTips":["Always run before status in CI pipelines","Keep mission filenames stable so the slug-derived summary path doesn't drift"],"tags":["mission","file-not-found","filesystem"],"backgroundTag":"file-not-found","analyzedSha":"3ad79a8a6fe6e95fdbb8c00e40716fffe4011ce2","analyzedAt":"2026-08-27T22:18:39.783Z","schemaVersion":2},"datasetVersion":"2026-08-28T00:17:15.603Z"}