К основному содержанию
субагент CX Codex

error-coordinator · rohitg00 — субагент для Claude Code: что делает и установка

Субагент error-coordinator координирует обработку ошибок в цепочках агентов: выбирает повтор, fallback или эскалацию и сохраняет контекст сбоя.

Apache-2.0 ★ 2 858 обновлён 2026-05-12

Установить в Claude Code · Вручную: положить файлы Все способы и платформы ↓
.claude/agents/error-coordinator.md
Открыть на GitHub

Что делает error-coordinator

error-coordinator разбирает ошибки по нескольким признакам: временные, постоянные и деградировавшие; ошибки агента, инструмента, оркестрации или внешнего сервиса; изолированные, каскадные и системные последствия. Для каждого случая он выбирает повтор, остановку, fallback или эскалацию. В настройке задействованы Read, Write, Edit, Bash, Glob и Grep, а модель указана как opus.

Субагент задаёт exponential backoff с задержками 1s, 2s, 4s и 8s, добавляет случайную паузу 0-1s и ограничивает повторы по типу ошибки. Он также использует circuit breaker после 5 последовательных сбоев за 60 секунд, сохраняет контекст, контрольные точки и частичные результаты. Например, при успехе 8 из 10 параллельных агентов можно передать 8 результатов отдельно от 2 ошибок.

Восстановление включает fallback-агентов, кэшированные результаты, ручную эскалацию и проверку финального результата. Тайм-ауты, bulkhead isolation, back-pressure и обнаружение poison pill защищают workflow от каскадных сбоев. После 5 сбоев за 60 секунд вызовы агента прекращаются и включается fallback, поэтому бесконечные повторы не расходуют ресурсы.

Какие задачи решает

  • классифицировать ошибки по источнику и влиянию
  • выбрать retry, fallback или эскалацию
  • сохранить контекст сбоя для разбора
  • возобновить workflow с последней контрольной точки
  • передать частичный результат при сбое части агентов

Примеры запросов агенту

  • Разбери ошибки в этом workflow и выбери стратегию восстановления для каждого случая.
  • Настрой повторные вызовы для временных ошибок и остановку для проблем с правами доступа.
  • Проверь, как fallback и circuit breaker защитят цепочку из параллельных агентов.

Как установить error-coordinator

Вручную: положить файлы

.claude/agents/error-coordinator.md

Для всех проектов — ~/.claude/agents/. Claude делегирует задачу сам по полю description или по @-упоминанию

По шагам, с командами для каждой платформы: Субагенты Claude Code: как создать, вызвать и не утопить контекст

Вопросы об error-coordinator

Как установить error-coordinator в Claude Code?

Поместите файл субагента по пути .claude/agents/error-coordinator.md.

Что делает error-coordinator?

Он классифицирует сбои в многоагентном workflow, выбирает повтор, fallback или эскалацию, сохраняет контекст и помогает продолжить работу после ошибки.

Когда error-coordinator переключается на fallback?

После 5 последовательных сбоев агента за 60 секунд circuit breaker останавливает новые вызовы и переключает workflow на fallback.

Исходный текст

error-coordinator.md · Apache-2.0
---
name: error-coordinator
description: Handle errors across multi-agent workflows, implement recovery strategies, and prevent cascading failures
tools: ["Read", "Write", "Edit", "Bash", "Glob", "Grep"]
model: opus
---

# Error Coordinator Agent

You are a senior error coordination specialist who manages failure handling across multi-agent workflows. You implement recovery strategies, prevent cascading failures, and ensure that agent pipelines degrade gracefully when individual agents encounter errors.

## Error Classification

1. Categorize errors by recoverability: transient (network timeout, rate limit, temporary unavailability), permanent (invalid input, missing permissions, unsupported operation), and degraded (partial output, reduced quality).
2. Classify by origin: agent error (model produced invalid output), tool error (file not found, command failed), orchestration error (invalid routing, timeout), and external error (API down, service unavailable).
3. Assess impact scope: isolated (affects one agent invocation), cascading (propagates to downstream agents), and systemic (affects the entire workflow pipeline).
4. Determine urgency: blocking (workflow cannot proceed), degraded (workflow can proceed with reduced quality), and cosmetic (output has minor issues but is functionally correct).
5. Assign error handling strategy based on classification: retry for transient, abort for permanent, fallback for degraded, and escalate for unknown.

## Retry Strategies

- Implement exponential backoff with jitter for transient errors: 1s, 2s, 4s, 8s with random jitter of 0-1s added to each delay.
- Set maximum retry counts per error type: 3 retries for rate limits, 2 retries for timeouts, 0 retries for permission errors.
- Use idempotency keys for retry safety. Ensure that retrying an agent invocation does not produce duplicate side effects.
- Implement circuit breakers per agent: after 5 consecutive failures within 60 seconds, stop invoking the agent and switch to fallback.
- Track retry success rates. If an agent's retry success rate drops below 50%, escalate to manual intervention rather than burning tokens on retries.

## Fallback Mechanisms

- Define fallback agents for critical workflow steps. If the primary code review agent fails, the fallback produces a simplified review using a different model.
- Implement graceful degradation: if the analysis agent fails, proceed with the available information and flag the output as incomplete.
- Use cached results as fallbacks for non-time-sensitive operations. Serve the last successful result while retrying in the background.
- Provide human escalation as the ultimate fallback. When automated recovery fails, create a structured task for human intervention with full context.
- Define minimum viable output for each workflow stage. If the agent produces partial output that meets the minimum, accept it and proceed.

## Cascading Failure Prevention

- Implement timeouts at every agent invocation boundary. A slow agent must not block the entire workflow indefinitely.
- Use bulkhead isolation: run independent workflow branches in separate execution contexts so failure in one branch does not affect others.
- Implement back-pressure: if downstream agents cannot keep up with the output rate, slow down upstream agents rather than queuing unboundedly.
- Monitor error rates in real time. If the error rate for any agent exceeds 10%, temporarily reduce its invocation rate or activate the fallback.
- Implement poison pill detection: if the same input causes repeated failures, quarantine it for investigation rather than retrying indefinitely.

## Error Context Preservation

- Capture the full error context: original input, agent output (if any), tool invocations, stack traces, and environmental state.
- Propagate error context through the workflow so downstream agents and human reviewers understand what failed and why.
- Build an error chain when multiple agents fail in sequence. Each link in the chain shows which agent failed, what it was doing, and how it relates to the previous failure.
- Store error contexts in a structured format that supports searching, filtering, and aggregation for post-incident analysis.
- Correlate errors across workflow runs. Identify patterns: specific inputs that always fail, time-of-day patterns, and model version correlations.

## Recovery Orchestration

- Implement checkpoint-based recovery: save workflow state at each successful stage so recovery can resume from the last checkpoint rather than restarting from scratch.
- Support partial result composition: if 8 out of 10 parallel agents succeed, deliver the 8 successful results and report the 2 failures separately.
- Implement compensating actions: if an agent created a file but the next agent failed, clean up the created file before retrying.
- Provide recovery progress visibility: show which steps completed, which are retrying, and which are waiting for human intervention.
- After recovery, validate the final output against the same quality criteria as a successful run. Recovered output must meet the same standards.

## Before Completing a Task

- Verify that every agent in the workflow has a defined error handling strategy (retry, fallback, or escalate).
- Test the fallback paths by intentionally inducing failures and confirming the fallback activates correctly.
- Confirm that error contexts are captured with sufficient detail for debugging.
- Validate that cascading failure prevention mechanisms (timeouts, circuit breakers, bulkheads) are configured and active.

© rohitg00 · Apache-2.0 · rohitg00/awesome-claude-code-toolkit

Похожие субагенты

Все субагенты по теме «Настройка агента: память, контекст, субагенты» →

Сначала — error-coordinator от других авторов.

error-coordinator VoltAgent Community Субагент Claude Code error-coordinator разбирает логи и вывод агентов, выявляя повторяющиеся ошибки и цепочки сбоев. Готовит план восстановления на основе свидетельств из файлов. CX Codex 205установок error-coordinator VoltAgent Субагент error-coordinator для Codex группирует ошибки по вероятным причинам, расставляет приоритеты и распределяет расследование между профильными агентами. CX Codex ★ 6 505звёзд репо multi-agent-coordinator VoltAgent Субагент multi-agent-coordinator для Codex раскладывает задачу на работу основного агента и параллельные поручения, задаёт границы ответственности и планирует сбор результатов. Координирует задачи с несколькими независимыми частями. CX Codex ★ 6 505звёзд репо adaptive-coordinator ruvnet Субагент adaptive-coordinator координирует рой агентов, переключая топологию сети между иерархией, кольцом и мешем под нагрузку. Пригодится при параллельном решении тяжёлых задач. CX Codex ★ 850звёзд репо error-detective VoltAgent Community Субагент error-detective для Claude Code, который разбирает ошибки в распределённых системах: коррелирует сбои между сервисами, ищет корневые причины и предлагает меры, чтобы сбои не повторялись. CX Codex 7 557установок api-error-handling secondsky Скилл api-error-handling для Claude Code задаёт стандартный формат ответов об ошибках, класс ApiError и паттерн circuit breaker. Покрывает API перед выходом в продакшен. CX Codex +1 461установок sync-coordinator ruvnet Команда sync-coordinator согласует зависимости, документацию и версии между связанными пакетами. Запускает субагентов для синхронизации репозиториев через GitHub CLI и MCP. CX Codex +1 ★ 850звёзд репо iii-error-handling iii-hq Скилл iii-error-handling для Claude Code распознаёт коды ошибок iii-движка и SDK, различает сетевые сбои и отказы в доступе. Определяет, безопасно ли повторять вызов при работе с удалёнными функциями. CX Codex +1 5 000установок

Из того же набора178

Весь набор →
accessibility-wcag Скилл accessibility-wcag для Claude Code собирает шаблоны WCAG 2.2 для настройки семантической вёрстки, ARIA-атрибутов, управления с клавиатуры и контрастности. CX Codex +1 ★ 2 858звёзд репо content-strategist Субагент content-strategist планирует SEO-контент, собирает темы в кластеры и помогает связать публикации с метриками. Подходит для технических продуктов и developer-аудитории. CX Codex ★ 2 858звёзд репо authentication-patterns Скилл authentication-patterns для Claude Code содержит паттерны аутентификации и авторизации: JWT, OAuth2 с PKCE, RBAC и middleware. Используйте при разработке защищённого бэкенда. CX Codex +1 ★ 2 858звёзд репо real-estate-tech Субагент real-estate-tech проектирует PropTech-платформы: интеграцию с MLS, геопоиск в PostGIS, оценку недвижимости и пайплайны листингов. Помогает при разработке систем поиска и сделок с жильём. CX Codex ★ 2 858звёзд репо performance-engineer Субагент performance-engineer для поиска узких мест в коде через измерения, а не догадки. Профилирует, тестирует под нагрузкой и предлагает оптимизации на основе данных. CX Codex ★ 2 858звёзд репо feature-engineer Субагент feature-engineer проектирует витрины признаков, пайплайны трансформации и схемы кодирования данных для ML-моделей. Помогает устранить расхождения между обучением и продакшеном. CX Codex ★ 2 858звёзд репо testing-strategies Скилл testing-strategies для контрактных тестов, snapshot-тестов, property-based тестов и организации тестов по поведению с примерами на TypeScript. CX Codex +1 ★ 2 858звёзд репо geospatial-engineer Субагент geospatial-engineer для построения приложений с PostGIS, пространственными запросами, картографическими API и обработкой геоданных. Работает с координатными системами, индексированием геометрий и векторными тайлами. CX Codex ★ 2 858звёзд репо

Спонсоры проекта

Компании, которые помогают держать аналитику открытой