NousResearch/hermes-agent · warning · BlueprintFillError

unknown recurrence {preset!r} — one of {', '.join(WEEKDAY_PR

Error message

unknown recurrence {preset!r} — one of {', '.join(WEEKDAY_PRESETS)}

What it means

BlueprintFillError: the schedule template has a {dow} placeholder, a `recurrence` value was provided, and it is not a key in WEEKDAY_PRESETS after lowercasing. The message lists the valid presets so the caller can re-ask with the allowed vocabulary.

Source

Thrown at cron/blueprint_catalog.py:715

    repl: Dict[str, str] = {}

    # time -> minute/hour
    time_val = values.get("time")
    if "{minute}" in sched or "{hour}" in sched:
        if not time_val:
            raise BlueprintFillError("a time is required")
        m = _TIME_RE.match(str(time_val).strip())
        if not m:
            raise BlueprintFillError(f"invalid time {time_val!r} — use HH:MM (24h)")
        repl["hour"] = str(int(m.group(1)))
        repl["minute"] = str(int(m.group(2)))

    # weekday set -> dow
    if "{dow}" in sched:
        if "recurrence" in values:
            preset = str(values.get("recurrence", "everyday")).lower()
            if preset not in WEEKDAY_PRESETS:
                raise BlueprintFillError(
                    f"unknown recurrence {preset!r} — one of {', '.join(WEEKDAY_PRESETS)}"
                )
            repl["dow"] = WEEKDAY_PRESETS[preset]
        elif "day" in values:
            day = str(values.get("day", "")).lower()
            if day not in _DAY_TO_DOW:
                raise BlueprintFillError(f"unknown day {day!r}")
            repl["dow"] = _DAY_TO_DOW[day]
        else:
            repl["dow"] = "*"

    # interval (minutes) for */N schedules
    if "{interval_min}" in sched:
        iv = str(values.get("interval_min", "")).strip()
        if not iv.isdigit() or int(iv) <= 0:
            raise BlueprintFillError(f"invalid interval {iv!r} — minutes as a positive integer")
        repl["interval_min"] = iv

View on GitHub (pinned to c896c09c42)

Solutions

  1. Use one of the presets named in the error message (e.g. 'everyday', 'weekdays', 'weekends' — the exact keys of WEEKDAY_PRESETS)
  2. For arbitrary day sets, pass `day` (single day name) or a free-text `schedule` instead of `recurrence`

Example fix

# before
fill_blueprint(bp, {"time": "08:00", "recurrence": "every weekday"})
# BlueprintFillError: unknown recurrence 'every weekday' — one of ...

# after
fill_blueprint(bp, {"time": "08:00", "recurrence": "weekdays"})
Defensive patterns

Strategy: validation

Validate before calling

from cron.blueprint_catalog import WEEKDAY_PRESETS

def valid_recurrence(r: str) -> bool:
    return r.lower() in WEEKDAY_PRESETS

Try / catch

try:
    spec = fill_blueprint(bp, values)
except BlueprintFillError as e:
    if str(e).startswith("unknown recurrence"):
        values["recurrence"] = pick_from(WEEKDAY_PRESETS)
        spec = fill_blueprint(bp, values)
    else:
        raise

Prevention

When it happens

Trigger: fill_blueprint with values containing recurrence='biweekly' or recurrence='Mon-Fri' (any string not in WEEKDAY_PRESETS), on a template containing '{dow}'.

Common situations: Agent-translated natural language ('every weekday') into a preset name that doesn't exist; user free-typed a recurrence the form never offered.

Related errors


AI-assisted analysis of NousResearch/hermes-agent@c896c09c42 (2026-08-14). Data as JSON: /api/errors/cfd28c7487fc2b93. Report an issue: GitHub.