Significant-Gravitas/AutoGPT · warning · ExpertRunPausedError

{expert.name} is archived; her schedules do not run.

Error message

{expert.name} is archived; her schedules do not run.

What it means

ExpertRunPausedError (a ValueError subclass, backend/util/exceptions.py:185) raised by the schedule run-time gate in scheduling.py:299: the expert exists but isArchived is True, so her schedules refuse to run. This is a deliberate backstop — archived experts keep their schedule rows, but execution is blocked even if trigger detachment failed during archive.

Source

Thrown at autogpt_platform/backend/backend/api/features/experts/scheduling.py:299

    Raises ExpertRunPausedError when the expert is archived, paused, or has
    hit her weekly credit budget — breaching pauses her and posts an
    in-thread message. Approaching the budget posts a once-per-week warning.

    The spend read is a snapshot, not an atomic reservation: N runs firing
    in the same instant can each pass the check before any of them meters
    cost. That overshoot is bounded by per-run cost × concurrent firings,
    the next gate check pauses her, and the durable wallet (credit system)
    is charged correctly regardless — this gate is a churn guardrail, not
    the billing ledger, so the simpler check is the deliberate trade-off.
    """
    expert = await prisma.models.Expert.prisma().find_first(
        where={"id": expert_id, "ownerUserId": user_id, "isTemplate": False}
    )
    if expert is None:
        return
    if expert.isArchived:
        raise ExpertRunPausedError(
            f"{expert.name} is archived; her schedules do not run.", expert_id
        )
    if expert.schedulesPausedAt is not None:
        raise ExpertRunPausedError(f"{expert.name}'s schedules are paused.", expert_id)
    budget = effective_weekly_budget(expert)
    if budget is None:
        return
    spent = await get_weekly_spend(expert_id)
    if spent >= budget:
        await pause_expert_schedules(
            user_id,
            expert_id,
            reason=f"Weekly credit budget reached ({spent}/{budget})",
        )
        await _post_budget_message(user_id, expert, spent, budget, breached=True)
        raise ExpertRunPausedError(
            f"{expert.name} hit her weekly credit budget ({spent}/{budget}); "
            "schedules are paused until you resume them.",

View on GitHub (pinned to 9c8bb5550f)

Solutions

  1. Expected behavior: unarchive (re-hire the template revives the row) if you want schedules to run again.
  2. If triggers keep firing for archived experts, call the detach/cleanup path again or inspect scheduler state — the gate already prevented the run.
  3. Handle the error non-fatally in the execution path; it is a guardrail, not a bug.
Defensive patterns

Strategy: try-catch

Validate before calling

expert = await get_expert(user_id, expert_id)
if expert is not None and expert.is_archived:
    skip_schedule_run()  # don't even attempt the run

Type guard

def blocks_runs(e: Expert) -> bool:
    return e.is_archived or e.schedules_paused_at is not None

Try / catch

try:
    await gate_and_run(...)
except ExpertRunPausedError as e:
    logger.info(f'schedule refused: {e}')  # expected backstop; do not alert

Prevention

When it happens

Trigger: A scheduled trigger fires for an expert after archive_expert ran — e.g. the detach_expert_triggers call inside archive failed (it is swallowed with a logged exception), leaving a live trigger, and the scheduler then invokes the gate.

Common situations: Scheduler hiccups during archive; triggers recreated manually after archiving; delayed/queued trigger deliveries arriving after the user archived the expert.

Related errors


AI-assisted analysis of Significant-Gravitas/AutoGPT@9c8bb5550f (2026-08-14). Data as JSON: /api/errors/9765055f8bbbe343. Report an issue: GitHub.