Graceful-Degradation Service Wiring Pattern
- Entity ID:
ent-20260420-svc12d0000js - Type:
concept - Scope:
shared - Status:
active - Aliases: fail-silently wiring, stub-or-skip pattern
Description
Architectural pattern used by Claude Code's service layer: every backend-dependent service (GrowthBook, policy limits, remote settings, bootstrap) must fail silently with a safe default (feature flags return false, limits return 'no limit', settings fall back to defaults) rather than crashing the CLI. The rebuild effort codifies this as an invariant: missing remote backend must still yield a working app given only an API key.
Key claims
- Backend-dependent services must degrade to safe defaults, not crash
- Integration tests skip gracefully when ANTHROPIC_API_KEY is absent
- Init sequence mixes blocking and fire-and-forget services
Relations
- Graceful-Degradation Service Wiring Pattern --[informed_by]--> src/entrypoints/init.ts (Service Init Sequence)