openai/codex-plugin-cc · warning · Error

No finished Codex jobs found for this repository yet.

Error message

No finished Codex jobs found for this repository yet.

What it means

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.

Source

Thrown at plugins/codex/scripts/lib/job-control.mjs:278

    jobs,
    reference,
    (job) => job.status === "completed" || job.status === "failed" || job.status === "cancelled"
  );

  if (selected) {
    return { workspaceRoot, job: selected };
  }

  const active = matchJobReference(jobs, reference, (job) => job.status === "queued" || job.status === "running");
  if (active) {
    throw new Error(`Job ${active.id} is still ${active.status}. Check /codex:status and try again once it finishes.`);
  }

  if (reference) {
    throw new Error(`No finished job found for "${reference}". Run /codex:status to inspect active jobs.`);
  }

  throw new Error("No finished Codex jobs found for this repository yet.");
}

export function resolveCancelableJob(cwd, reference, options = {}) {
  const workspaceRoot = resolveWorkspaceRoot(cwd);
  const jobs = sortJobsNewestFirst(listJobs(workspaceRoot));
  const activeJobs = jobs.filter((job) => job.status === "queued" || job.status === "running");

  if (reference) {
    const selected = matchJobReference(activeJobs, reference);
    if (!selected) {
      throw new Error(`No active job found for "${reference}".`);
    }
    return { workspaceRoot, job: selected };
  }

  const sessionScopedActiveJobs = filterJobsForCurrentSession(activeJobs, options);

  if (sessionScopedActiveJobs.length === 1) {

View on GitHub (pinned to db52e28f4d)

Solutions

  1. Launch a Codex job and let it reach a terminal status before requesting results.
  2. Run /codex:status to confirm whether any jobs exist and their states.
  3. If a finished job exists but is filtered out by session, pass its id explicitly to bypass session scoping.

Example fix

// before
resolveResultJob(cwd); // nothing finished yet

// after
// ensure a job exists and finishes first
// startJob(...); then:
resolveResultJob(cwd);
Defensive patterns

Strategy: validation

Validate before calling

function hasAnyFinishedJob(jobs) {
  return jobs.some((j) => ["completed", "failed", "cancelled"].includes(j.status));
}

const jobs = filterJobsForCurrentSession(listJobs(workspaceRoot), options);
if (!hasAnyFinishedJob(jobs)) {
  throw new Error("No finished jobs in this session yet. Start and complete a job first.");
}

Try / catch

try {
  resolveResultJob(cwd);
} catch (err) {
  if (/No finished Codex jobs/.test(err.message)) {
    // nothing to recover; inform user to run a job first
    console.error(err.message);
  } else throw err;
}

Prevention

When it happens

Trigger: 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.

Common situations: First-time use in a repo before any Codex job finishes; all prior jobs are still active; session filtering excludes the only finished jobs.

Related errors


AI-assisted analysis of openai/codex-plugin-cc@db52e28f4d (2026-08-13). Data as JSON: /api/errors/b872afa9237dcfa6. Report an issue: GitHub.