Your agent pipeline fails. What happens next?
In most setups, the answer is: retry. The retry fails. Retry again with backoff. Still failing? Log a generic error, drop the request, and hope someone notices. The pipeline has no idea why it failed, whether retrying will help, or whether the failure is burning through an error budget that's already overdrawn.
This is the error analysis gap. Agent pipelines have orchestration, they have monitoring, they even have circuit breakers. What they lack is the diagnostic layer between "something went wrong" and "here's what to do about it." Most pipeline operators discover error patterns by reading logs after an outage — the reactive debugging loop that scales exactly as poorly as your pipeline grows.
Three Error Analysis Primitives
Production error analysis requires three capabilities that operate at different timescales: real-time classification when errors occur, strategic recovery when classification reveals actionable patterns, and continuous budget tracking to catch degradation before it breaches SLOs.
1. Error Classification and Root Cause Analysis
Raw errors are noisy. A 500 from an upstream skill could be a transient network blip, an auth token expiration, a schema mismatch from a version bump, a rate limit hit, or a genuine bug. Each demands a different response. Retrying a rate limit error makes it worse. Retrying an auth failure is futile until the token refreshes.
The error-classifier skill accepts raw error payloads — stack traces, HTTP responses, timeout events, schema validation failures — and returns structured classifications. Each error gets a category (network, auth, schema, timeout, rate-limit, resource, logic, upstream, configuration), severity level, root cause hypothesis with confidence score, affected component identification, and actionable remediation steps.
At $0.002/call, classification costs less than a single wasted retry on a misdiagnosed error. More importantly, the classifier groups recurring errors by signature. When the same authentication failure surfaces 47 times across different pipeline runs, you see one pattern — not 47 individual incidents.
2. Recovery Strategy Recommendations
Knowing what went wrong is half the problem. The other half is knowing what to do about it. Most pipelines implement exactly one recovery strategy: retry with exponential backoff. This is correct for transient network errors and wrong for everything else.
The recovery-strategy-engine skill takes a classified error and pipeline context, then returns ranked recovery strategies with estimated success probability, cost, and execution plan. Strategies go beyond retry: input transformation (fix the malformed payload that caused the schema error), fallback skill routing (switch to an alternative skill that handles the same task), checkpoint rollback (revert to the last successful pipeline state), partial result salvage (extract usable output from a partially completed pipeline), and graceful degradation (return a reduced result rather than nothing).
At $0.003/call, a recovery recommendation costs less than blindly executing the wrong strategy. In execute mode, the engine auto-executes the highest-confidence strategy — closing the loop from detection to resolution without human intervention.
3. Error Budget Tracking with Burn Rate Alerting
Individual errors are incidents. Error rates over time are trends. The difference between "this pipeline had 3 errors today" and "this pipeline is burning its monthly error budget at 4x the sustainable rate" is the difference between reactive debugging and proactive reliability engineering.
The error-budget-tracker skill maintains rolling window error budgets per skill or pipeline with SLO compliance monitoring. Configure a 99.9% availability target and a 30-day window, then record invocation outcomes. The tracker computes real-time error budget consumption, multi-window burn rates (1h, 6h, 24h, 7d), and projects when the budget will breach at current rates.
At $0.001/call for recording events and checking status, continuous error budget tracking costs approximately $1.50/day for a pipeline processing 1,500 daily invocations. The burn rate alerting catches degradation early — a 6-hour burn rate spike triggers a webhook hours before the 30-day SLO would breach, giving operators time to intervene rather than apologize.
The Error Analysis Stack
These three primitives compose into a complete diagnostic layer:
- Detection: An error occurs in your pipeline
- Classification:
error-classifieridentifies it as an auth token expiration (category: auth, severity: high, confidence: 0.94) - Recovery:
recovery-strategy-enginerecommends token refresh + retry (success probability: 0.91) over blind retry (success probability: 0.12) - Tracking:
error-budget-trackerrecords the failure and confirms the pipeline is still within SLO — but the 6-hour burn rate just hit 2.3x sustainable
Each step adds information. Without classification, the recovery engine can't recommend the right strategy. Without recovery strategies, operators default to retry-everything. Without budget tracking, nobody knows the pipeline is degrading until the SLO breaches and a customer complains.
What This Costs
For a pipeline running 500 invocations per day with a 2% error rate (10 errors/day):
| Primitive | Daily calls | Cost/call | Daily cost |
|---|---|---|---|
| Error Classifier | 10 | $0.002 | $0.02 |
| Recovery Strategy Engine | 10 | $0.003 | $0.03 |
| Error Budget Tracker | 500 | $0.001 | $0.50 |
| Total | $0.55/day |
The budget tracker runs on every invocation (recording successes and failures). The classifier and recovery engine run only on errors. Total cost: $0.55/day for complete diagnostic coverage of a 500-call/day pipeline.
Compare this to the cost of undiagnosed errors: wasted retries at $0.002-0.01 each, cascading failures that burn through circuit breaker cooldowns, and SLO breaches that erode customer trust. A single misdiagnosed error that triggers 50 futile retries costs more than a month of classification.
Composability with the Existing Stack
Error analysis sits between detection (StatusPulse.dev uptime monitoring, MetricStream.io alerting) and response (PipelineGuard.dev circuit breakers, QueuePilot.dev retry policies). The composition is natural:
- Uptime monitor detects failure → error-classifier diagnoses it → recovery-strategy-engine fixes it → error-budget-tracker records the outcome
- Alert rule fires on error spike → error-classifier groups by signature → incident commander opens a ticket with root cause already identified
- Circuit breaker opens → error-budget-tracker projects SLO impact → notification skill alerts the team with burn rate data
Each skill in the chain adds context that the next skill uses. The uptime monitor knows that something failed. The classifier knows why. The recovery engine knows what to do. The budget tracker knows whether to worry.
Why Skills Beat Error Handling Libraries
You could build error classification into your pipeline code. Many teams do, with a growing switch statement that handles the error categories they've encountered so far. This approach has three problems:
Taxonomy drift: Every team invents its own error categories. When Pipeline A classifies "connection refused" as "network" and Pipeline B classifies it as "upstream," cross-pipeline analysis is impossible. A shared classification skill enforces a consistent taxonomy.
Recovery isolation: Error handling logic embedded in pipeline code can't learn from other pipelines. A recovery engine that sees error patterns across the BluePages marketplace learns which strategies work for which error categories — knowledge that stays locked in bespoke implementations.
Budget blindness: Error budgets require continuous tracking across all invocations, not just failures. Embedding this in application code means every pipeline reimplements the same rolling-window math, burn rate calculation, and alerting logic. A dedicated tracker skill handles the math and surfaces the insights.
Getting Started
The ErrorLens.dev skills are available now on the BluePages marketplace. Start with the error classifier — it works standalone without the full stack. Add the recovery engine when you want automated remediation. Add the budget tracker when you need SLO compliance reporting.
The Error Analysis & Recovery collection in the browse sidebar surfaces all three skills alongside complementary diagnostics from the pipeline reliability and observability verticals.
Every agent pipeline will eventually need to understand its own failures. The question is whether you build that understanding before or after the first SLO breach.