failure-analyzer

failure-analyzer is an agent for Claude Code from datacore-one/datacore. It costs 33 tokens per session (673 once invoked), scanned A, original, MIT.

An agent that examines failed automated nightshift tasks to identify the likely cause and recommend what to do next. It classifies failures as temporary or permanent and decides whether a retry is appropriate.

In plain words
What is it for?
Use it after an automated task fails to diagnose the problem, advise retry or skip decisions, and report patterns for the nightshift workflow.
Why use it?
A failed task does not always mean the underlying work is wrong: timeouts and rate limits may be temporary, while other errors need a fix or escalation. This analysis separates those cases and captures recurring patterns.

Agent for Claude Code

Written for Claude Code: a Claude Code subagent (agents/*.md). Also seen: model in frontmatter.

Good fit Use it after an automated task fails to diagnose the problem, advise retry or skip decisions, and report patterns for the nightshift workflow.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/datacore-one/datacore/failure-analyzer
Install

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.

Clone the repo
git clone --depth 1 https://github.com/datacore-one/datacore

Made for: Claude Code.

Wrote 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.

agentmods badge for failure-analyzer

README.md
[![agentmods](https://agentmods.dev/badge/agents/datacore-one/datacore/failure-analyzer/github.svg)](https://agentmods.dev/agents/datacore-one/datacore/failure-analyzer)
Your own site
<a href="https://agentmods.dev/agents/datacore-one/datacore/failure-analyzer"><img src="https://agentmods.dev/badge/agents/datacore-one/datacore/failure-analyzer/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for failure-analyzer

Your own site · 80×15
<a href="https://agentmods.dev/agents/datacore-one/datacore/failure-analyzer"><img src="https://agentmods.dev/badge/agents/datacore-one/datacore/failure-analyzer.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 33 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 673 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00033 $0.00673
Opus 5.5 $0.00013 $0.00269
Sonnet 5.5 $0.00007 $0.00135
Haiku 4.5 $0.00003 $0.00067

Measured 1mo ago against content hash 436bb322f2e0, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

failure-analyzer 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 1mo 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.

.datacore/agents/failure-analyzer.md · 82 lines

How it starts

The opening of the file, as written. The whole thing — 82 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Failure Analyzer Agent

You analyze failed nightshift task executions to identify root causes and recommend next steps.

Engram Injection

Before starting work, load relevant learned patterns:

  1. Preferred: Call plur_admin MCP tool with action = "plur_inject_hybrid", prompt = your task description, scope = agent:failure-analyzer
  2. Fallback: If MCP is unavailable, read .datacore/state/agent-engrams/failure-analyzer.md for compiled engrams

Engrams encode learned behavioral patterns that improve task quality.

Agent Context

When to Reference

Called by:

  • run.py failure hook — automatic invocation after task execution failure
  • nightshift-orchestrator — during post-execution review

Key decisions:

  • Classify failure type (transient vs permanent)
  • Recommend retry, skip, or escalate
  • Extract patterns for learning pipeline

Quick Reference

Question Answer
Trigger? Task execution failure in run.py
Output? Failure analysis JSON
Retry eligible? Transient errors only (API timeout, rate limit)
Max retries? From settings: nightshift.max_retries (default 2)
What DIPs govern this? DIP-0009 (GTD), DIP-0011 (Nightshift)

Failure Categories

Category Retryable Examples
transient Yes API timeout, rate limit, network error
context Maybe Missing file, stale reference, broken link
specification No Ambiguous task, missing acceptance criteria
capability No Task requires tool/access agent lacks
unknown Yes (once) Unclassified errors

Behavior

Given a failed task and its error output:

  1. Classify the failure category
  2. Extract the root cause from error messages
  3. Determine if retry would help
  4. If retryable: suggest modified approach or increased timeout
  5. If not retryable: recommend human action (edit task, add context, split task)
  6. Log analysis to .datacore/state/nightshift/failures/

Read the full file on GitHub · 82 lines

Changes

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.

  1. 1mo ago First seen · 82 lines · 33 tokens per session scan A 436bb322f2e0

Subscribe to this mod's changes

failure-analyzer is an agent published in the GitHub repository datacore-one/datacore (4 stars, last pushed today), licensed MIT. It adds 33 tokens to every session and 673 once invoked, about $0.0001 per session on Opus 5.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-08-31.

Related

Other agents, from other repositories

keystone

Structured end-to-end trace to find the FIRST broken link in a specific claim's dependency chain. Single-claim depth probe — NOT a breadth reviewer. Use when a consequential claim ("X is enforced", "Y has a fallback", "Z reaches the main agent") needs primary-evidence verification across its full chain. Advisory…

sliamh11/Deus · 87 tokens

code-explorer

Fast read-only code exploration with codegraph intelligence. Use for locating code, understanding architecture, tracing call paths, finding symbols, and answering "where is X" / "how does X work" questions. Replaces built-in Explore with codegraph-first tool selection.

sliamh11/Deus · 57 tokens

rca-debugger

Root-cause analyzer for complex multi-system failures — the third stage of the debugging escalation chain (build-error-resolver → systematic-debugger → rca-debugger → escalation-fixer). Escalation from systematic-debugger when the bisect is inconclusive, there is a CI-vs-local discrepancy, the bug is flaky, or the…

sangrokjung/claude-forge · 118 tokens

refactor-cleaner

An agent for finding and safely removing dead code, unused exports, unused dependencies, and duplicate implementations.

sangrokjung/claude-forge · 109 tokens

01-calendar-pull

Fetch calendar events for the next 7 days via Google Calendar MCP.

assafkip/kipi-system · 18 tokens

systematic-debugger

Specialist for bugs that reproduce but whose root cause is unknown. Enforces a strict reproduce → bisect → hypothesize → verify protocol; never guesses a fix without a failing test first. Use proactively when a bug reproduces but the cause is unclear — "why does this happen", "works locally but not in CI"…

sangrokjung/claude-forge · 170 tokens