Urgent.News

What's breaking now, across thousands of outlets.

AI

Your AI Agent Crashes on 429 Errors and You're Burning Money

Your AI Agent Crashes on 429 Errors and You're Burning Money Handling rate limits the right way saves you from unexpected bills and keeps your app reliable. Why 429 Errors Matter When you call an AI service (OpenAI, Anthropic, Cohere, etc.) you're usually limited by a rate limit – a maximum number of requests per minute or per day. If you exceed it, the API returns HTTP 429 Too Many Requests . If…

Exceeding API rate limits leads to 429 Too Many Requests errors, causing lost work and escalating costs if handled poorly. Graceful handling involves pausing, respecting Retry-After headers, applying exponential backoff, and logging for tuning. The provided Python script demonstrates a retry function that detects 429 errors, uses the Retry-After header or exponential backoff, caps attempts to avoid infinite loops, and logs occurrences for analysis.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in AI

How to audit MCP tool schema token bloat and sync CLAUDE.md with AGENTS.md locally

If you connect 4–5 MCP servers to Claude Code or OpenAI Codex (GitHub, Playwright, Postgres, Notion), their tools/list JSON schemas silently consume 15,000–35,000 tokens on every turn before you even…

  • 4–5 MCP servers can consume up to 35,000 tokens per turn
  • CtxWise v1.0 tool inspects and fixes schema token bloat
  • CtxWise syncs CLAUDE.md with AGENTS.md locally

More from Monday 19 October →