- Category: B. Software Architecture
- English term: Fallback Chain / Cascading Fallback
- Related: Model Cascade and Routing · Retry Limits and Circuit Breakers · Local-First (Local Pipeline) · Exit Code Contract · Asymmetric Tiered AI Architecture (Tier 1-3)
General Meaning
A Fallback Chain is a resilience design pattern where, instead of failing immediately when a primary service or model is unavailable, the system routes the work to a prepared alternative.
By chaining second and third fallback options in priority order, an architecture can survive external vendor outages, API quota exhaustion, or local hardware limits without downtime while optimizing cost and capability.
Why It Matters
- Preventing total outage from single-vendor failures: If one AI provider or API goes down, work automatically shifts to an alternative provider.
- Optimizing cost and quota usage: Tries free local models and lightweight tiers first, falling back to expensive frontier models only when strictly justified.
- Avoiding wasted rework: Passing along intermediate outputs and failure diagnostics allows the next stage to continue rather than starting over from scratch.
How the Site Factory Uses It
The Site Factory defines strict fallback chains in two dimensions: Model Cascade (K104) and Agent Runner Dispatch. Under K104, tasks start on each Mac's local LLM (Tier 1); if local inference fails validation or cannot run, the reason is logged and the job falls back to lightweight external models (Cursor Auto → Antigravity Gemini Flash low → Codex Luna → Claude Haiku), escalating to top-tier models only when concrete verification deficiencies are documented.
For agent runners (Claude → Codex → Cursor → Antigravity), when a worker hits a quota limit or unavailability (exit codes 42 or 75), the dispatcher automatically re-queues the ticket to the next available runner so the pipeline never stalls.
Caveats & Operational Rules
- Never jump straight to the strongest model: Starting with top-tier models burns through monthly quotas in hours; always start with local or lightweight models first.
- Carry forward intermediate progress and failure reasons: Hand off validation errors and partial outputs to the next stage so the fallback runner does not repeat the exact same mistake.
- Do not chain infinitely: Cap the chain with retry limits and timeouts; if all fallbacks fail, mark the task
holdand escalate viaoperator_review.
Related Terms
- Model Cascade and Routing
- Retry Limits and Circuit Breakers
- Local-First (Local Pipeline)
- Exit Code Contract
- Asymmetric Tiered AI Architecture (Tier 1-3)
References
- Book: Mark Richards & Neal Ford, *Fundamentals of Software Architecture*, Chapter 12 (Service Resilience)
Verified: 2026-11-08