openai/codex-plugin-cc · error · Error
No finished job found for "${reference}". Run /codex:status
Error message
No finished job found for "${reference}". Run /codex:status to inspect active jobs. What it means
Thrown by resolveResultJob() when a reference is supplied, no finished job matches it, AND no active job matches it either — the reference points to nothing in any lifecycle state. This is the reference-specific counterpart to error 47; it confirms the id is unknown rather than the repo being empty.
Source
Thrown at plugins/codex/scripts/lib/job-control.mjs:275
const workspaceRoot = resolveWorkspaceRoot(cwd);
const jobs = sortJobsNewestFirst(reference ? listJobs(workspaceRoot) : filterJobsForCurrentSession(listJobs(workspaceRoot)));
const selected = matchJobReference(
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 };
}
View on GitHub (pinned to db52e28f4d)
Solutions
- Run /codex:status to find current active/finished jobs and retry with a valid id.
- Confirm the reference is from this repo's job history.
- If you need results for an old job, restore its job file or relaunch the work.
Example fix
// before
resolveResultJob(cwd, "stale-id");
// after
// pick the most recent finished job explicitly
const snap = buildStatusSnapshot(cwd, { all: true });
resolveResultJob(cwd, snap.recent[0]?.id ?? snap.latestFinished?.id); Defensive patterns
Strategy: validation
Validate before calling
function hasFinishedJobForReference(jobs, reference) {
const finished = jobs.filter((j) => ["completed", "failed", "cancelled"].includes(j.status));
return finished.some((j) => j.id === reference || j.id.startsWith(reference));
}
const jobs = listJobs(workspaceRoot);
if (reference && !hasFinishedJobForReference(jobs, reference)) {
throw new Error(`No finished job for '${reference}'.`);
} Try / catch
try {
resolveResultJob(cwd, ref);
} catch (err) {
if (/No finished job found/.test(err.message)) {
buildStatusSnapshot(cwd, { all: true }); // list what's there
} else throw err;
} Prevention
- Confirm a job is in a terminal state via /codex:status before requesting its results.
- Cache valid job ids right after they finish to avoid stale references.
- Treat 'No finished job found' as a re-list trigger, not a retry of the same id.
When it happens
Trigger: Calling resolveResultJob(cwd, ref) where ref matches neither a finished job nor an active job. Reference is non-empty but resolves to nothing across the full job list.
Common situations: Stale id from a rotated/archived job log; typo; id from a different workspace; the job state file was manually deleted.
Related errors
- No finished Codex jobs found for this repository yet.
- No job found for "${reference}". Run /codex:status to list k
- No job found for "${reference}". Run /codex:status to inspec
- Job ${active.id} is still ${active.status}. Check /codex:sta
- No active job found for "${reference}".
AI-assisted analysis of openai/codex-plugin-cc@db52e28f4d (2026-08-13).
Data as JSON: /api/errors/eb7691e829052150.
Report an issue: GitHub.