openai/codex-plugin-cc · error · Error

No stored job found for ${options["job-id"]}.

Error message

No stored job found for ${options["job-id"]}.

What it means

readStoredJob(workspaceRoot, jobId) loads the persisted job file for the given id. If it returns null (file missing, job id typo, wrong workspace root, or the job was never written), the worker cannot proceed because it needs the stored request payload. The message interpolates the job-id so the user can see what was looked up.

Source

Thrown at plugins/codex/scripts/codex-companion.mjs:851

    source: options.source
  });
  outputCommandResult(payload, rendered, options.json);
}

async function handleTaskWorker(argv) {
  const { options } = parseCommandInput(argv, {
    valueOptions: ["cwd", "job-id"]
  });

  if (!options["job-id"]) {
    throw new Error("Missing required --job-id for task-worker.");
  }

  const cwd = resolveCommandCwd(options);
  const workspaceRoot = resolveCommandWorkspace(options);
  const storedJob = readStoredJob(workspaceRoot, options["job-id"]);
  if (!storedJob) {
    throw new Error(`No stored job found for ${options["job-id"]}.`);
  }

  const request = storedJob.request;
  if (!request || typeof request !== "object") {
    throw new Error(`Stored job ${options["job-id"]} is missing its task request payload.`);
  }

  const { logFile, progress } = createTrackedProgress(
    {
      ...storedJob,
      workspaceRoot
    },
    {
      logFile: storedJob.logFile ?? null
    }
  );
  await runTrackedJob(
    {

View on GitHub (pinned to db52e28f4d)

Solutions

  1. Confirm the job-id exists via /codex:status or by listing the state directory.
  2. Ensure --cwd resolves to the same workspace root where the job was enqueued.
  3. Re-enqueue the background task to generate a fresh job-id.

Example fix

// before (job does not exist under this workspace)
codex-companion.mjs task-worker --cwd /wrong/repo --job-id task-abc123
// after
codex-companion.mjs task-worker --cwd /correct/repo --job-id task-abc123
Defensive patterns

Strategy: validation

Validate before calling

const job = readStoredJob(workspaceRoot, id);
if (!job) throw new Error(`no stored job ${id}`);

Type guard

/** @param {unknown} j @returns {j is object} */
function storedJobExists(j) { return j != null && typeof j === 'object'; }

Prevention

When it happens

Trigger: task-worker with a job-id that does not exist under the resolved workspaceRoot; running the worker after state was cleared; pointing --cwd at the wrong repo so the workspace root differs from where the job was stored.

Common situations: Stale job id copied from old logs, workspace root resolution mismatch (resolveCommandWorkspace differs from the enqueue-time root), or state directory cleaned.

Related errors


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