← Claude Code Hub
Jul 11, 2026 · 3 min read ✦ Tip #131

Your plan B for Claude Code's 529 errors

When your model returns a 529 (Overloaded) mid-task, the request doesn't have to die. Configure a chain of backup models and Claude Code degrades on its own instead of leaving you stuck.

Fallback chain in Claude Code: the primary model returns a 529 and the request jumps to the next backup model

TL;DR You're deep in a long task and your model returns Overloaded (error 529). Instead of failing the request, Claude Code can switch to a backup model on its own and keep going. You give it a chain of up to three models with --fallback-model or with fallbackModel in settings, and when the primary is overloaded or down, it degrades in order instead of killing your session.

Degrade instead of dying

When your primary model is overloaded (529), unavailable, or returns another non-retryable server error, Claude Code switches to a backup model and carries on, showing you a notice. Authentication, billing, rate-limit, request-size, and transport errors don't trigger the switch: those follow their normal retry and error handling. And the switch lasts for the current turn only: your next message tries the primary first again.

What it looks like

✳ claude-opus-5 · Overloaded (HTTP 529)
  ↳ fallback → claude-sonnet-5
✔ the task keeps going, you don't lose the turn

Setup

1. One session: the flag

claude --fallback-model sonnet,haiku

A comma-separated list, tried in order. The flag takes precedence over the setting.

2. Persistent: settings.json

{
  "fallbackModel": ["claude-sonnet-5", "claude-haiku-4-5"]
}

An array. Each element takes a model name or an alias, and "default" expands to the default model.

3. What triggers the switch (and what doesn't)

  • Yes: primary overloaded (529), unavailable, or another non-retryable server error.
  • No: auth, billing, rate-limit, request-size, transport. Those retry or fail as usual.

4. The chain's limits

  • Capped at three models, after duplicates are removed; extras are ignored.
  • An element is skipped if the model is unavailable (e.g. a retired one you left pinned) or if it's outside your availableModels (there it's dropped when the chain is read, never even tried).

Reference

Element What it is
--fallback-model a,b Chain for one session (the flag beats the setting)
"fallbackModel": [...] Persistent chain in settings.json (array)
"default" Expands to the default model
Chain cap 3 models (duplicates removed; extras ignored)
Triggers the switch 529 / unavailable / non-retryable server error
Doesn't trigger it auth, billing, rate-limit, request size, transport
Scope Current turn only; the next one goes back to the primary

Don't mix it up: this is the availability fallback. It's different from the content-based automatic model fallback, where cybersecurity or biology classifiers reroute the request to another model. Both Fable 5 and Opus 5 have that mechanism, each with its own destination depending on the flagged category. One is "my model is down"; the other is "this content gets rerouted". And if what you want isn't surviving an outage but picking the right model up front, that's a different tip: this one covers the plan B for when your pick isn't available. And heads-up, if the fallback kicked in and left you on a weaker model, it can just look like Claude got dumber: why Claude gets worse in long sessions lists it among the causes.

Official docs: Model configuration: Fallback model chains

Found this useful? See more of wmedia.es in your Google results.

Add wmedia.es as a preferred source on Google
FREE GUIDE

You don't need Opus every time.

Model and effort are two settings, not one. 8 pages with the settings that actually move your bill, a three-question diagnostic for when something fails, and the price ladder.

  • 1. What "better" means capability, time and money
  • 2. Model who you send
  • 3. Effort how much rope you give
  • 4. Diagnostic three questions when something fails
  • 5. The bill where it comes from
Are you a professional Web developer?

You'll receive the guide by email · You join the Gravitas newsletter · Unsubscribe anytime

of 8
#

Wmedia · 8 pages
FREE GUIDE · 8 pages · 2 dials

You don't need Opus every time.

Model and effort are two settings, not one. 8 pages with the settings that actually move your bill, a three-question diagnostic for when something fails, and the price ladder.

Are you a professional Web developer? · Unsubscribe anytime
How I use AI

My Claude Code workflow.

The skills, agents and instructions I use as a professional Software Engineer. It's called Craft, and it's a plugin you can install.

See the skills

Using Opus for everything? See when you don't need it.