Verified Claude Code
Avoid hard failures on overload with --fallback-model
What it does
Falls back automatically when the main model is overloaded or unavailable; a comma list is tried in order, and the primary is retried at each user turn.
How
claude -p "..." --fallback-model sonnet,haiku
How much to trust this
| Applies to | ≥ 2.1.143 |
|---|---|
| Verified | Oct 17, 2026 · v2.1.296 · tested locally 2.1.296 的 --help 中存在;changelog 最早在 2.1.143 提到 |
| Depends on | --fallback-model |
| Source | https://code.claude.com/docs/en/cli-reference (official_docs) |