{"record":{"id":"b872afa9237dcfa6","repo":"openai/codex-plugin-cc","slug":"no-finished-codex-jobs-found-for-this-repository-y","errorCode":null,"errorMessage":"No finished Codex jobs found for this repository yet.","messagePattern":"No finished Codex jobs found for this repository yet\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"warning","filePath":"plugins/codex/scripts/lib/job-control.mjs","lineNumber":278,"sourceCode":"    jobs,\n    reference,\n    (job) => job.status === \"completed\" || job.status === \"failed\" || job.status === \"cancelled\"\n  );\n\n  if (selected) {\n    return { workspaceRoot, job: selected };\n  }\n\n  const active = matchJobReference(jobs, reference, (job) => job.status === \"queued\" || job.status === \"running\");\n  if (active) {\n    throw new Error(`Job ${active.id} is still ${active.status}. Check /codex:status and try again once it finishes.`);\n  }\n\n  if (reference) {\n    throw new Error(`No finished job found for \"${reference}\". Run /codex:status to inspect active jobs.`);\n  }\n\n  throw new Error(\"No finished Codex jobs found for this repository yet.\");\n}\n\nexport function resolveCancelableJob(cwd, reference, options = {}) {\n  const workspaceRoot = resolveWorkspaceRoot(cwd);\n  const jobs = sortJobsNewestFirst(listJobs(workspaceRoot));\n  const activeJobs = jobs.filter((job) => job.status === \"queued\" || job.status === \"running\");\n\n  if (reference) {\n    const selected = matchJobReference(activeJobs, reference);\n    if (!selected) {\n      throw new Error(`No active job found for \"${reference}\".`);\n    }\n    return { workspaceRoot, job: selected };\n  }\n\n  const sessionScopedActiveJobs = filterJobsForCurrentSession(activeJobs, options);\n\n  if (sessionScopedActiveJobs.length === 1) {","sourceCodeStart":260,"sourceCodeEnd":296,"githubUrl":"https://github.com/openai/codex-plugin-cc/blob/db52e28f4d9ded852ab3942cea316258ae4ef346/plugins/codex/scripts/lib/job-control.mjs#L260-L296","documentation":"Thrown by resolveResultJob() when no reference is given and there are zero finished jobs in the current session's job set. It is the 'no results exist yet' baseline error — distinct from error 46 which requires a reference. Indicates the repo/session has never produced a completed/failed/cancelled Codex job.","triggerScenarios":"Calling resolveResultJob(cwd) (no reference) on a session-scoped job list where every job is still queued/running, or where the job list is entirely empty.","commonSituations":"First-time use in a repo before any Codex job finishes; all prior jobs are still active; session filtering excludes the only finished jobs.","solutions":["Launch a Codex job and let it reach a terminal status before requesting results.","Run /codex:status to confirm whether any jobs exist and their states.","If a finished job exists but is filtered out by session, pass its id explicitly to bypass session scoping."],"exampleFix":"// before\nresolveResultJob(cwd); // nothing finished yet\n\n// after\n// ensure a job exists and finishes first\n// startJob(...); then:\nresolveResultJob(cwd);","handlingStrategy":"validation","validationCode":"function hasAnyFinishedJob(jobs) {\n  return jobs.some((j) => [\"completed\", \"failed\", \"cancelled\"].includes(j.status));\n}\n\nconst jobs = filterJobsForCurrentSession(listJobs(workspaceRoot), options);\nif (!hasAnyFinishedJob(jobs)) {\n  throw new Error(\"No finished jobs in this session yet. Start and complete a job first.\");\n}","typeGuard":null,"tryCatchPattern":"try {\n  resolveResultJob(cwd);\n} catch (err) {\n  if (/No finished Codex jobs/.test(err.message)) {\n    // nothing to recover; inform user to run a job first\n    console.error(err.message);\n  } else throw err;\n}","preventionTips":["Ensure at least one Codex job reaches a terminal status before calling resolveResultJob with no reference.","Use /codex:status to verify finished jobs exist in the current session.","Pass an explicit id to bypass session scoping if a finished job exists elsewhere."],"tags":["job-control","not-found","codex","results","empty-state"],"backgroundTag":null,"analyzedSha":"db52e28f4d9ded852ab3942cea316258ae4ef346","analyzedAt":"2026-08-13T05:13:20.855Z","schemaVersion":2},"datasetVersion":"2026-08-13T09:17:06.757Z"}