{"record":{"id":"5f575cc1cc72e6d4","repo":"NousResearch/hermes-agent","slug":"cron-job-field-s-cannot-be-updated-join-so","errorCode":null,"errorMessage":"Cron job field(s) cannot be updated: {', '.join(sorted(bad_fields))}","messagePattern":"Cron job field\\(s\\) cannot be updated: (.+?)","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"cron/jobs.py","lineNumber":1865,"sourceCode":"    try:\n        from cron.executions import latest_executions\n\n        latest = latest_executions([job.get(\"id\", \"\") for job in jobs])\n    except Exception:\n        latest = {}\n    for job in jobs:\n        job[\"latest_execution\"] = latest.get(job.get(\"id\", \"\"))\n    return jobs\n\n\ndef update_job(job_id: str, updates: Dict[str, Any]) -> Optional[Dict[str, Any]]:\n    \"\"\"Update a job by ID, refreshing derived schedule fields when needed.\"\"\"\n    # Block mutation of immutable fields. ``id`` in particular is a filesystem\n    # path component under OUTPUT_DIR — letting an update change it leaks\n    # path-escape values into output writes/deletes.\n    bad_fields = _IMMUTABLE_JOB_FIELDS.intersection(updates or {})\n    if bad_fields:\n        raise ValueError(\n            f\"Cron job field(s) cannot be updated: {', '.join(sorted(bad_fields))}\"\n        )\n\n    with _jobs_lock():\n        jobs = load_jobs()\n        for i, job in enumerate(jobs):\n            if job[\"id\"] != job_id:\n                continue\n\n            # Validate / normalize workdir if present in updates.  Empty string\n            # or None both mean \"clear the field\" (restore old behaviour).\n            if \"workdir\" in updates:\n                _wd = updates[\"workdir\"]\n                if _wd in {None, \"\", False}:\n                    updates[\"workdir\"] = None\n                else:\n                    updates[\"workdir\"] = _normalize_workdir(_wd)\n","sourceCodeStart":1847,"sourceCodeEnd":1883,"githubUrl":"https://github.com/NousResearch/hermes-agent/blob/c896c09c42910c584c4c7d2325b58c14713ea42c/cron/jobs.py#L1847-L1883","documentation":"Error \"Cron job field(s) cannot be updated: {', '.join(sorted(bad_fields))}\" thrown in NousResearch/hermes-agent.","triggerScenarios":"Thrown at cron/jobs.py:1865 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Update only editable cron job fields; remove the listed fields from the update."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"c896c09c42910c584c4c7d2325b58c14713ea42c","analyzedAt":"2026-08-14T17:18:01.089Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}