{"record":{"id":"8adc4bf5d419345a","repo":"openai/codex-plugin-cc","slug":"no-stored-job-found-for-options-job-id","errorCode":null,"errorMessage":"No stored job found for ${options[\"job-id\"]}.","messagePattern":"No stored job found for (.+?)\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"plugins/codex/scripts/codex-companion.mjs","lineNumber":851,"sourceCode":"    source: options.source\n  });\n  outputCommandResult(payload, rendered, options.json);\n}\n\nasync function handleTaskWorker(argv) {\n  const { options } = parseCommandInput(argv, {\n    valueOptions: [\"cwd\", \"job-id\"]\n  });\n\n  if (!options[\"job-id\"]) {\n    throw new Error(\"Missing required --job-id for task-worker.\");\n  }\n\n  const cwd = resolveCommandCwd(options);\n  const workspaceRoot = resolveCommandWorkspace(options);\n  const storedJob = readStoredJob(workspaceRoot, options[\"job-id\"]);\n  if (!storedJob) {\n    throw new Error(`No stored job found for ${options[\"job-id\"]}.`);\n  }\n\n  const request = storedJob.request;\n  if (!request || typeof request !== \"object\") {\n    throw new Error(`Stored job ${options[\"job-id\"]} is missing its task request payload.`);\n  }\n\n  const { logFile, progress } = createTrackedProgress(\n    {\n      ...storedJob,\n      workspaceRoot\n    },\n    {\n      logFile: storedJob.logFile ?? null\n    }\n  );\n  await runTrackedJob(\n    {","sourceCodeStart":833,"sourceCodeEnd":869,"githubUrl":"https://github.com/openai/codex-plugin-cc/blob/db52e28f4d9ded852ab3942cea316258ae4ef346/plugins/codex/scripts/codex-companion.mjs#L833-L869","documentation":"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.","triggerScenarios":"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.","commonSituations":"Stale job id copied from old logs, workspace root resolution mismatch (resolveCommandWorkspace differs from the enqueue-time root), or state directory cleaned.","solutions":["Confirm the job-id exists via /codex:status or by listing the state directory.","Ensure --cwd resolves to the same workspace root where the job was enqueued.","Re-enqueue the background task to generate a fresh job-id."],"exampleFix":"// before (job does not exist under this workspace)\ncodex-companion.mjs task-worker --cwd /wrong/repo --job-id task-abc123\n// after\ncodex-companion.mjs task-worker --cwd /correct/repo --job-id task-abc123","handlingStrategy":"validation","validationCode":"const job = readStoredJob(workspaceRoot, id);\nif (!job) throw new Error(`no stored job ${id}`);","typeGuard":"/** @param {unknown} j @returns {j is object} */\nfunction storedJobExists(j) { return j != null && typeof j === 'object'; }","tryCatchPattern":null,"preventionTips":["Resolve --cwd to the same workspace root used at enqueue time.","List jobs via /codex:status to confirm an id before targeting it."],"tags":["state","worker","job","not-found"],"backgroundTag":null,"analyzedSha":"db52e28f4d9ded852ab3942cea316258ae4ef346","analyzedAt":"2026-08-13T05:13:20.855Z","schemaVersion":2},"datasetVersion":"2026-08-13T09:17:06.757Z"}