NousResearch/hermes-agent · error · RuntimeError
Cron database corrupted: expected {'jobs': [...]}, got {type
Error message
Cron database corrupted: expected {'jobs': [...]}, got {type(data).__name__} What it means
Error "Cron database corrupted: expected {'jobs': [...]}, got {type(data).__name__}" thrown in NousResearch/hermes-agent.
Source
Thrown at cron/jobs.py:1120
# 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 back
# into the expected {"jobs": [...]} structure.
if data:
save_jobs(data)
logger.warning("Auto-repaired jobs.json (bare list wrapped as dict)")
_record_load_stamp(pre_read_stamp)
return data
raise RuntimeError(
f"Cron database corrupted: expected {{'jobs': [...]}}, got {type(data).__name__}"
)
def _peek_jobs_unlocked() -> Optional[List[Dict[str, Any]]]:
"""Best-effort read of on-disk jobs without repair side-effects.
Caller must hold ``_jobs_lock()``. Returns ``[]`` when the file is
missing, ``None`` when the payload is unreadable/corrupt (caller should
not attempt a shrink-merge against an unknown baseline). Never calls
``save_jobs`` — the repair-free property is what keeps the save path
re-entrancy-safe (a repairing read here would recurse through
``_save_jobs_unlocked``).
"""
jobs_file = _current_cron_store().jobs_file
if not jobs_file.exists():
return []
try:View on GitHub (pinned to c896c09c42)
Solutions
- Restore the cron database from backup; its top-level shape is invalid.
- Delete the corrupted database and recreate jobs.
When it happens
Trigger: Thrown at cron/jobs.py:1120 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/26e049b5c41aa4e6.
Report an issue: GitHub.