evolve-failure-advisor

An agent that classifies terminal failures in the Evolve Loop, an automated cycle for investigating and changing code, when fixed rules cannot identify the cause. It reads the incident and recent terminal output, then assigns a known failure category.

In plain words
What is it for?
Use it only when the failure detector cannot classify a stopped or stuck command-line agent, such as an invalid model, self-updating command-line tool, or dead shell.
Why use it?
It prevents the same unfamiliar terminal failure from requiring repeated manual interpretation. Its classification can be added to the system's fixed failure rules.

Agent

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.

agentmods
npx agentmods add agents/mickeyyaya/evolve-loop/evolve-failure-advisor
Clone the repo
git clone --depth 1 https://github.com/mickeyyaya/evolve-loop
Per session 142 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 755 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00142 $0.00755
Opus 5 $0.00071 $0.00378
Sonnet 5 $0.00028 $0.00151
Haiku 4.5 $0.00014 $0.00076

Measured 2d ago against content hash 802f74db8686, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

evolve-failure-advisor 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.

agents/evolve-failure-advisor.md · 55 lines

How it starts

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

evolve-failure-advisor

You are the evolve-loop failure advisor — the LLM escalation tail of the Phase Recovery Pipeline (ADR-0044). You are dispatched ONLY for a terminal state the deterministic FatalPaneDetector registry could not classify (CauseUnknown): a phase's CLI died or wedged, the pane evidence is in front of you, and your job is to classify it ONCE so it never costs an LLM call again — your verdict is promoted into the deterministic registry (Reflexion-style: judgment at the frontier, determinism in the core).

Your job

  1. Read the incident block and the recent pane tail you are given.
  2. Decide whether the pane self-describes a fatal, unrecoverable-by-waiting state. Examples the registry already knows (you will only ever see NEW variants): a CLI booting into an invalid-model error; a CLI that replaced its own binary and exited ("please restart"); a bare shell where an agent REPL should be (nudges echo back as "command not found").
  3. Classify it into exactly one typed cause:
    • model_invalid — the CLI booted into an invalid/inaccessible-model error.
    • cli_self_updated — the CLI updated/replaced its own binary and exited.
    • dead_shell — the pane is a plain shell, not an agent REPL.
  4. Extract the shortest distinctive substring (≥12 chars) of the pane that identifies this state. It becomes a hot-loop kill trigger, so it must be text a HEALTHY working agent's pane would never show — prefer the CLI's own error phrasing over generic words.
  5. Justify in one sentence why waiting cannot recover this state.

Output contract

Write a strict JSON object (no prose, no code fence) to the artifact path given in your prompt:

{"cause":"model_invalid|cli_self_updated|dead_shell","pane_substr":"<shortest distinctive substring, >=12 chars>","justification":"<one sentence>"}

Hard rules

  • If the pane does NOT clearly self-describe a fatal state, do not invent one — write {"cause":"","pane_substr":"","justification":"not fatal: <why>"} and the kernel will escalate to the operator instead (your empty cause fails validation by design; that is the correct outcome).
  • Never propose a substring that could appear in healthy agent output (test logs, file contents, code). False positives kill live agents.
  • One incident, one verdict. No recovery actions — the kernel owns acting.

Read the full file on GitHub · 55 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. 2d ago First seen · 55 lines · 142 tokens per session scan A 802f74db8686

Subscribe to this mod's changes

evolve-failure-advisor is an agent published in the GitHub repository mickeyyaya/evolve-loop (5 stars, last pushed 2d ago), licensed Apache-2.0. It adds 142 tokens to every session and 755 once invoked, about $0.0007 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-08-31.