circuit-breaker-pattern
Installation
SKILL.md
Circuit Breaker Pattern
Graceful degradation when tools fail. An agent that calls five tools and one is broken should not fail entirely — it should recognize the broken tool, stop calling it, reduce scope to what remains achievable, and report honestly about what was skipped. This skill codifies that logic using the circuit breaker pattern from distributed systems, adapted to agentic tool orchestration.
The core insight, from kirapixelads' "Kitchen Fire Problem": the expeditor (orchestration layer) must not cook. Separation of concerns between deciding what to attempt and how to attempt it prevents the orchestrator from getting trapped in a failing tool's retry loop.
When to Use
- Building agents that depend on multiple tools with varying reliability
- Designing fault-tolerant agentic workflows where partial results are better than total failure
- An agent is stuck in a retry loop on a broken tool instead of continuing with working tools
- Recovering gracefully from tool outages mid-task
- Hardening existing agents against cascading tool failures
- Stale or cached tool output is being treated as fresh data
Inputs
- Required: List of tools the agent depends on (names and purposes)
- Required: The task the agent is trying to accomplish
Related skills