Significant-Gravitas/AutoGPT · warning · RateLimitExceeded
You've reached your {window} usage limit. Resets in {time_st
Error message
You've reached your {window} usage limit. Resets in {time_str}. What it means
HTTP 429 from POST /chat/stream (routes.py:1463). After resolving the user's global limits, the endpoint calls check_rate_limit which tracks USD spend per daily and weekly window in Redis. When used >= limit, it raises RateLimitExceeded whose str(e) becomes the detail: 'You've reached your {window} usage limit. Resets in {time_str}.' with window='daily' or 'weekly' and a human-readable countdown.
Source
Thrown at autogpt_platform/backend/backend/api/features/chat/routes.py:1463
# Subscription-backed Codex turns do not spend platform model dollars, so
# neither the platform paywall nor its USD usage windows apply. Admission,
# pending-message frequency, and concurrent-turn caps remain enforced by
# the shared scheduling path below.
if user_id and is_platform_route:
try:
daily_limit, weekly_limit, _ = await get_global_rate_limits(
user_id,
config.daily_cost_limit_microdollars,
config.weekly_cost_limit_microdollars,
)
await check_rate_limit(
user_id=user_id,
daily_cost_limit=daily_limit,
weekly_cost_limit=weekly_limit,
)
except RateLimitExceeded as e:
raise HTTPException(status_code=429, detail=str(e)) from e
except RateLimitUnavailable as e:
# Fail-closed on Redis brown-out: the user may already be at or
# past their USD cap and we cannot prove otherwise. 503 + a short
# Retry-After is the right UX (transient outage, retry shortly),
# not 429 ("you hit your limit").
raise HTTPException(
status_code=503,
detail="Rate limit service degraded, retry shortly",
headers={"Retry-After": "30"},
) from e
# Enrich message with file metadata if file_ids are provided.
# Also sanitise file_ids so only validated, workspace-scoped IDs are
# forwarded downstream (e.g. to the executor via enqueue_copilot_turn).
sanitized_file_ids: list[str] | None = None
if request.file_ids:
files = await resolve_workspace_files(user_id, request.file_ids)
sanitized_file_ids = [wf.id for wf in files] or NoneView on GitHub (pinned to 9c8bb5550f)
Solutions
- Wait for the stated reset time (UTC midnight for daily, Monday 00:00 UTC for weekly) — the message embeds the countdown.
- If eligible, use POST /usage/reset to spend credits and clear the DAILY counter (only when the weekly cap is not also exhausted — see error 147).
- Switch to a cheaper model/mode for the rest of the window if the product allows it.
- Admins: raise daily/weekly cost limits for the affected tier if the caps are too aggressive.
Defensive patterns
Strategy: try-catch
Validate before calling
// check usage before sending if the session frequently hits caps
const u = await getUsageStatus();
if (u.daily.used >= u.daily.limit || u.weekly.used >= u.weekly.limit) {
showLimitReached(u); // offer reset or countdown
} else {
await post('/chat/stream', body);
} Try / catch
try { await post('/chat/stream', body); } catch (e) {
if (e.status === 429) { showLimitReached(e.detail); return; } // detail embeds window + reset countdown
throw e;
} Prevention
- Parse the 429 detail — it names the window (daily/weekly) and reset time
- Do not auto-retry 429s; offer the paid daily reset only when weekly isn't exhausted
- Track spend client-side per model to warn users before the cap
When it happens
Trigger: POST /chat/stream when the user's tracked spend reached daily_cost_limit_microdollars or weekly_cost_limit_microdollars (per tier via get_global_rate_limits). Every subsequent message this window gets the same 429.
Common situations: Long CoPilot sessions with expensive models exhausting the daily cap; heavy weeks hitting the $5 default weekly cap; new users with small trial-tier limits surprised mid-task.
Related errors
- You have not reached your daily limit yet.
- Your weekly limit is also reached. Resetting the daily limit
- Rate limit service degraded, retry shortly
- You've reached the limit of {resolved} active tasks (running
- Rate limit reset is not available.
AI-assisted analysis of Significant-Gravitas/AutoGPT@9c8bb5550f (2026-08-14).
Data as JSON: /api/errors/97562c1a2352957b.
Report an issue: GitHub.