openai/codex-plugin-cc · warning · Error

Job ${active.id} is still ${active.status}. Check /codex:sta

Error message

Job ${active.id} is still ${active.status}. Check /codex:status and try again once it finishes.

What it means

Thrown by resolveResultJob() when the requested job exists but is still in a queued or running state — there are no results to fetch yet. The function filters for finished jobs (completed|failed|cancelled) first; only if that misses but an active job matches does it emit this. It tells the user to wait for completion.

Source

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

  };
}

export function resolveResultJob(cwd, reference) {
  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}".`);

View on GitHub (pinned to db52e28f4d)

Solutions

  1. Wait for the job to finish, then retry (check /codex:status for status transitions).
  2. If the job is stuck, cancel it with /codex:cancel then relaunch.
  3. Poll status rather than results: use buildStatusSnapshot until status leaves queued|running.

Example fix

// before
resolveResultJob(cwd, jobId); // still running

// after
// poll until finished, then resolve results
let snap = buildSingleJobSnapshot(cwd, jobId);
// (externally) wait for snap.job.status in completed|failed|cancelled
resolveResultJob(cwd, jobId);
Defensive patterns

Strategy: retry

Validate before calling

function isJobFinished(job) {
  return ["completed", "failed", "cancelled"].includes(job.status);
}

const snap = buildSingleJobSnapshot(cwd, jobId).job;
if (!isJobFinished(snap)) {
  throw new Error(`Job ${snap.id} is still ${snap.status}. Wait for completion.`);
}
// only now:
resolveResultJob(cwd, jobId);

Type guard

function isFinishedJob(job) {
  return job != null && ["completed", "failed", "cancelled"].includes(job.status);
}

Try / catch

try {
  resolveResultJob(cwd, jobId);
} catch (err) {
  if (/is still/.test(err.message)) {
    // schedule a retry / poll status; do NOT spam resolveResultJob in a tight loop
    console.error(err.message);
  } else throw err;
}

Prevention

When it happens

Trigger: Calling resolveResultJob(cwd, ref) where ref matches a job whose status is 'queued' or 'running'. Also reached via resolveResultJob(cwd) with no ref when the only matching job in the current session is still active.

Common situations: Polling for results immediately after launching a Codex job; a long-running job the user mistakenly believes finished; CI polling on a job that stalled.

Related errors


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