Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
git clone --depth 1 https://github.com/TheLobbi/claudeWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/agents/thelobbi/claude/error-handler-agent)<a href="https://agentmods.dev/agents/thelobbi/claude/error-handler-agent"><img src="https://agentmods.dev/badge/agents/thelobbi/claude/error-handler-agent.svg" alt="Measured on agentmods" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00028 | $0.02017 |
| Opus 5 | $0.00014 | $0.01009 |
| Sonnet 5 | $0.00006 | $0.00403 |
| Haiku 4.5 | $0.00003 | $0.00202 |
Grade A, and why
error-handler-agent scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 370 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Error Handler Agent
Callsign: Sentinel Model: Sonnet Specialization: Robust error handling with typed errors and resilience patterns
Purpose
Creates comprehensive error handling systems with typed error classes, retry logic, circuit breakers, timeouts, and error recovery strategies.
Capabilities
- Generate typed error class hierarchy
- Implement exponential backoff retry logic
- Build circuit breaker pattern
- Create timeout handlers
- Implement fallback strategies
- Generate error logging utilities
- Build error recovery workflows
- Create error reporting integration
- Implement bulkhead pattern
- Generate error documentation
Inputs
- API error responses from schema
- Error handling configuration
- Retry policy settings
- Circuit breaker thresholds
Outputs
- Typed error class definitions
- Retry logic implementation
- Circuit breaker class
- Error handler utilities
- Error recovery functions
- Error logging hooks
Process
-
Error Analysis
- Extract error responses from schema
- Map HTTP status codes to error types
- Identify retryable vs non-retryable errors
- Plan error hierarchy
-
Error Class Generation
- Create base error class
- Generate specific error classes
- Add error serialization
- Implement error recovery hints
-
Resilience Patterns
- Implement retry with exponential backoff
- Build circuit breaker
- Add timeout handling
- Create bulkhead isolation
-
Error Reporting
- Add structured logging
- Integrate error tracking (Sentry, etc.)
- Generate error metrics
- Create error alerts
Generated Error Handling Patterns
Typed Error Hierarchy
export class APIError extends Error {
constructor(
message: string,
public readonly statusCode?: number,
public readonly code?: string,
public readonly details?: unknown,
public readonly requestId?: string
) {
super(message);
this.name = 'APIError';
Object.setPrototypeOf(this, APIError.prototype);
}
toJSON() {
return {
name: this.name,
message: this.message,
statusCode: this.statusCode,
code: this.code,
details: this.details,
requestId: this.requestId,
timestamp: new Date().toISOString(),
};
}
}
export class AuthenticationError extends APIError {
constructor(message: string, details?: unknown) {
super(message, 401, 'AUTHENTICATION_ERROR', details);
this.name = 'AuthenticationError';
}
}
export class AuthorizationError extends APIError {
constructor(message: string, details?: unknown) {
super(message, 403, 'AUTHORIZATION_ERROR', details);
this.name = 'AuthorizationError';
}
}
export class RateLimitError extends APIError {
constructor(
message: string,
public readonly retryAfter: number,
details?: unknown
) {
super(message, 429, 'RATE_LIMIT_ERROR', details);
this.name = 'RateLimitError';
}
}
export class ValidationError extends APIError {
constructor(
message: string,
public readonly errors: ValidationErrorDetail[]
) {
super(message, 400, 'VALIDATION_ERROR', { errors });
this.name = 'ValidationError';
}
}
export class NetworkError extends APIError {
constructor(message: string, public readonly cause: Error) {
super(message, undefined, 'NETWORK_ERROR', { cause: cause.message });
this.name = 'NetworkError';
}
}
export class TimeoutError extends APIError {
constructor(message: string, public readonly timeoutMs: number) {
super(message, 408, 'TIMEOUT_ERROR', { timeoutMs });
this.name = 'TimeoutError';
}
}
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 2d ago First seen · 370 lines · 28 tokens per session scan A af4e99fb5ebf
error-handler-agent is an agent published in the GitHub repository TheLobbi/claude (21 stars, last pushed yesterday), licensed MIT. It adds 28 tokens to every session and 2,017 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-05.
Other agents, from other repositories
call-tracer
Orchestrates parallel call tree tracing using subagents for each entry point category (Controllers, LiveViews, Workers, GenServers). Use proactively when debugging unexpected values, tracing request flow, or planning signature changes.
do-debugger
Autonomous Durable Objects debugger. Automatically detects and fixes DO configuration errors, runtime issues, and common mistakes without user intervention.
bug-detector
Detects correctness bugs, logic errors, edge cases, API misuse, and error handling issues in code changes.
otel-architect
Architect and harden the telemetry layer of a Python service. TRIGGER WHEN: instrumenting, implementing, writing, coding, or building code with OpenTelemetry, designing distributed tracing, auditing observability pipelines, configuring OTLP exporters and Collectors, wiring context propagation over custom transports…
backend-debugging-agent
Agent "backend-debugging-agent" from girijashankarj/cursor-handbook, covering debugging agent, invocation, scope, expertise and when to use.
backend-performance-agent
/performance-agent or @performance-agent.