Significant-Gravitas/AutoGPT · warning · ExpertRunPausedError
{expert.name} hit her weekly credit budget ({spent}/{budget}
Error message
{expert.name} hit her weekly credit budget ({spent}/{budget}); schedules are paused until you resume them. What it means
ExpertRunPausedError raised at scheduling.py:315 when weekly spend >= effective_weekly_budget(expert). The gate first durably pauses the expert's schedules (pause_expert_schedules), posts a chat message to the user via _post_budget_message(breached=True), then raises. This is the budget churn-guardrail — actual billing is handled separately by the credit system.
Source
Thrown at autogpt_platform/backend/backend/api/features/experts/scheduling.py:315
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.",
expert_id,
)
if spent >= int(budget * _BUDGET_WARN_FRACTION):
await _post_budget_message(user_id, expert, spent, budget, breached=False)
async def _post_budget_message(
user_id: str,
expert: prisma.models.Expert,
spent: int,
budget: int,
breached: bool,
) -> None:
"""Post the warning/pause message into the expert's thread. Deduped to
once per expert per week per kind via the deterministic message id.
Never raises — a failed post must not affect the run decision."""View on GitHub (pinned to 9c8bb5550f)
Solutions
- Call POST /experts/{expert_id}/schedules/resume once you accept more spend, and/or raise the expert's weekly budget.
- Reduce schedule cadence or trim preload rosters to keep weekly spend under budget.
- Wait for the weekly window to reset if the spend is time-boxed; the pause persists until explicitly resumed.
Defensive patterns
Strategy: try-catch
Validate before calling
spent, budget = await get_weekly_spend(expert_id), effective_weekly_budget(expert)
if budget is not None and spent >= budget:
surface_budget_notice(spent, budget) # don't fire the schedule Try / catch
try:
await run_schedule(...)
except ExpertRunPausedError as e:
if 'credit budget' in str(e):
prompt_user_to_raise_budget_or_resume(expert_id) Prevention
- Set weekly budgets with headroom for the expert's schedule cadence.
- Watch for the warning message posted at the spend threshold (it fires before the hard pause).
- Resume schedules explicitly after raising a budget — the breach pause persists otherwise.
When it happens
Trigger: A scheduled run fires for an expert with a weekly budget set, and accumulated weekly spend (get_weekly_spend) has reached or exceeded it. The next firing of any of her schedules produces this error.
Common situations: Aggressive schedule cadences (e.g. roster preloads) burning credits early in the week; a lowered budget taking effect mid-week under existing spend; multiple schedules sharing one expert's budget.
Related errors
- {expert.name} is archived; her schedules do not run.
- {expert.name}'s schedules are paused.
- Expert not found
- str(e)
- start and end query params are required
AI-assisted analysis of Significant-Gravitas/AutoGPT@9c8bb5550f (2026-08-14).
Data as JSON: /api/errors/0d65fda4030f9b04.
Report an issue: GitHub.