{"record":{"id":"200d3c59b53aedd5","repo":"NousResearch/hermes-agent","slug":"cron-workdir-is-not-a-directory-resolved","errorCode":null,"errorMessage":"Cron workdir is not a directory: {resolved}","messagePattern":"Cron workdir is not a directory: (.+?)","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"cron/jobs.py","lineNumber":1427,"sourceCode":"    Returns the absolute path string, or None when disabled.\n    Raises ValueError on invalid input.\n    \"\"\"\n    if workdir is None:\n        return None\n    raw = str(workdir).strip()\n    if not raw:\n        return None\n    expanded = Path(raw).expanduser()\n    if not expanded.is_absolute():\n        raise ValueError(\n            f\"Cron workdir must be an absolute path (got {raw!r}). \"\n            f\"Cron jobs run detached from any shell cwd, so relative paths are ambiguous.\"\n        )\n    resolved = expanded.resolve()\n    if not resolved.exists():\n        raise ValueError(f\"Cron workdir does not exist: {resolved}\")\n    if not resolved.is_dir():\n        raise ValueError(f\"Cron workdir is not a directory: {resolved}\")\n    return str(resolved)\n\n\ndef _resolve_default_model_snapshot() -> Optional[str]:\n    \"\"\"Resolve the global default model the same way the cron ticker does.\n\n    Mirrors the unpinned-model resolution in ``cron/scheduler.py`` ``run_job``:\n    read ``config.yaml`` ``model.default`` (or the ``model`` alias / bare string\n    form), applying the managed-scope overlay and env expansion. Used by\n    ``create_job`` to snapshot the default model for unpinned jobs so a later\n    swap of the global default is detected at fire time (#44585).\n\n    Returns the resolved model string, or ``None`` if config is missing/empty\n    or resolution fails (fail-open — caller treats ``None`` as \"no snapshot\").\n    \"\"\"\n    try:\n        from hermes_cli.config import _expand_env_vars, read_user_config_raw\n","sourceCodeStart":1409,"sourceCodeEnd":1445,"githubUrl":"https://github.com/NousResearch/hermes-agent/blob/c896c09c42910c584c4c7d2325b58c14713ea42c/cron/jobs.py#L1409-L1445","documentation":"Error \"Cron workdir is not a directory: {resolved}\" thrown in NousResearch/hermes-agent.","triggerScenarios":"Thrown at cron/jobs.py:1427 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Point the job workdir at a directory, not a file."],"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"}