error-learning

A command interface for managing the error-learning system's recorded mistakes, fixes, learned patterns, and pattern packs.

In plain words
What is it for?
Use it to view statistics, review pending patterns, list or enable pattern packs, and manage learned error data.
Why use it?
It gives you one place to check what the system has learned and decide which recurring error patterns should be enabled.

Command

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 commands/jonathondouglasyager-debug/claude-error-learning/error-learning
Clone the repo
git clone --depth 1 https://github.com/jonathondouglasyager-debug/claude-error-learning
Per session 17 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 881 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.00017 $0.00881
Opus 5 $0.00009 $0.00441
Sonnet 5 $0.00003 $0.00176
Haiku 4.5 $0.00002 $0.00088

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

Security

Grade A, and why

error-learning 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.

commands/error-learning.md · 127 lines

How it starts

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

Error Learning Management

You are helping manage the error learning system. Based on the action requested, perform the appropriate task.

Available Actions

/error-learning (or /error-learning status)

Show current status and statistics:

  1. Read config.json to show enabled packs
  2. Read patterns/active.json to count active patterns
  3. Read data/errors.jsonl to count errors and fixes
  4. Display summary with:
    • Number of active patterns
    • Number of errors logged
    • Number of fixes captured
    • Enabled pattern packs

/error-learning review

Review pending patterns for approval:

  1. Run: python hooks/error-curator.py --review
  2. Show the output which lists:
    • All error signatures found
    • Which are NEW vs EXISTS
    • Sample error and fix commands
    • Instructions for adding patterns

/error-learning packs

List available pattern packs and their status:

  1. Read config.json to get enabled_packs
  2. List all .json files in patterns/packs/
  3. For each pack, show:
    • Pack name
    • Enabled/disabled status
    • Number of patterns
    • Description

/error-learning packs enable

Enable a pattern pack:

  1. Read config.json
  2. Add pack name to enabled_packs if not present
  3. Write updated config.json
  4. Run: python hooks/error-curator.py --merge
  5. Confirm the change

/error-learning packs disable

Disable a pattern pack:

  1. Read config.json
  2. Remove pack name from enabled_packs
  3. Write updated config.json
  4. Run: python hooks/error-curator.py --merge
  5. Confirm the change

/error-learning add ""

Manually add a pattern:

  1. Parse the pattern description
  2. Read patterns/packs/custom.json
  3. Create a new pattern entry with:
    • Unique ID based on description
    • Match type (contains, regex, or exact)
    • Block message
    • Learned fix (if provided)
  4. Append to custom.json patterns array
  5. Run: python hooks/error-curator.py --merge
  6. Confirm the addition

Example Outputs

Status Output

Error Learning Status
=====================
Active Patterns: 12
  - common: 5 patterns
  - windows: 4 patterns
  - learned: 3 patterns

Error Log: 47 errors, 23 fixes (49% fix rate)

Enabled Packs: common, learned, custom

Read the full file on GitHub · 127 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 · 127 lines · 17 tokens per session scan A 124059b2febd

Subscribe to this mod's changes

error-learning is a command published in the GitHub repository jonathondouglasyager-debug/claude-error-learning (2 stars, last pushed 4mo ago), licensed MIT. It adds 17 tokens to every session and 881 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-08-31.