NousResearch/hermes-agent · error · RuntimeError
Failed to read cron database: {e}
Error message
Failed to read cron database: {e} What it means
Error "Failed to read cron database: {e}" thrown in NousResearch/hermes-agent.
Source
Thrown at cron/jobs.py:1094
def load_jobs() -> List[Dict[str, Any]]:
"""Load all jobs from storage."""
jobs_file = _current_cron_store().jobs_file
ensure_dirs()
# Stamp BEFORE reading (fail-safe direction — see _record_load_stamp):
# a sibling write racing this load leaves the stamp older than disk, so
# the save-path merge runs instead of being wrongly skipped.
pre_read_stamp = _jobs_file_stamp(jobs_file)
if not jobs_file.exists():
_record_load_stamp(None)
return []
try:
data, _strict_retry = _parse_jobs_file(jobs_file)
except IOError as e:
logger.error("IOError reading jobs.json: %s", e)
raise RuntimeError(f"Failed to read cron database: {e}") from e
except Exception as e:
logger.error("Failed to auto-repair jobs.json: %s", e)
raise RuntimeError(f"Cron database corrupted and unrepairable: {e}") from e
# Validate the top-level JSON shape: accept a dict (expected) or a bare
# list (auto-repair). Anything else (str/number/null) is corruption that
# would otherwise raise an uncaught AttributeError on ``.get()`` and take
# down the whole cron subsystem.
if isinstance(data, dict):
jobs = data.get("jobs", [])
if _strict_retry and jobs:
# Hit control-character corruption — rewrite with proper escaping.
save_jobs(jobs)
logger.warning("Auto-repaired jobs.json (had invalid control characters)")
_record_load_stamp(pre_read_stamp)
return jobs
if isinstance(data, list):
# Bare array — likely saved/edited outside save_jobs(). Wrap it backView on GitHub (pinned to c896c09c42)
Solutions
- Inspect the cron database file for corruption and restore from backup if available.
- Check filesystem permissions on the cron database.
When it happens
Trigger: Thrown at cron/jobs.py:1094 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of NousResearch/hermes-agent@c896c09c42 (2026-08-14).
Data as JSON: /api/errors/3abf1ad299e7a956.
Report an issue: GitHub.