debug-memory

A searchable store of earlier debugging sessions, including errors, attempted fixes, and results.

In plain words
What is it for?
Use it to search previous sessions, review recurring debugging patterns, see summary statistics, or clear the stored history.
Why use it?
It helps you reuse fixes and patterns from past failures instead of investigating the same problem from scratch.

Skill for Claude CodeCodex

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 skills/jmagly/aiwg/debug-memory
Any agent
npx skills add jmagly/aiwg --skill debug-memory
Clone the repo
git clone --depth 1 https://github.com/jmagly/aiwg

Made for: Claude Code, Codex.

Per session 11 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 452 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.00011 $0.00452
Opus 5 $0.00005 $0.00226
Sonnet 5 $0.00002 $0.00090
Haiku 4.5 $0.00001 $0.00045

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

Security

Grade A, and why

debug-memory 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.

agentic/code/addons/agent-loop/skills/debug-memory/SKILL.md · 67 lines

What it actually says

Debug Memory Command

Query, analyze, and manage the debug memory from executable feedback loops.

Instructions

Manage the debug memory stored in .aiwg/ralph/debug-memory/:

Subcommand: query

Search debug memory for relevant past execution sessions.

  1. Search .aiwg/ralph/debug-memory/sessions/ for matching entries
  2. Match by file path, error type, test name, or keyword
  3. Display relevant sessions with fix attempts and outcomes
  4. Highlight reusable patterns

Subcommand: patterns

Display learned patterns from past debug sessions.

  1. Load .aiwg/ralph/debug-memory/patterns/learned-patterns.yaml
  2. Show pattern frequency, success rate, and applicability
  3. Suggest patterns applicable to current context

Subcommand: stats

Show aggregate statistics from debug memory.

  1. Total sessions, pass rate, average attempts
  2. Most common error types
  3. Most effective fix patterns
  4. Files with highest failure frequency

Subcommand: clear

Clear debug memory (with confirmation).

  1. Prompt for confirmation
  2. Archive current memory to .aiwg/ralph/debug-memory/archive/
  3. Reset sessions and patterns

Arguments

  • query [keyword] - Search debug memory
  • patterns - Show learned patterns
  • stats - Show aggregate statistics
  • clear - Clear and archive debug memory
  • --file [path] - Filter by source file
  • --error [type] - Filter by error type
  • --since [date] - Filter by date

References

  • @$AIWG_ROOT/agentic/code/addons/ralph/schemas/debug-memory.yaml - Debug memory schema
  • @$AIWG_ROOT/agentic/code/frameworks/sdlc-complete/rules/executable-feedback.md - Executable feedback rules
  • @$AIWG_ROOT/agentic/code/addons/ralph/docs/executable-feedback-guide.md - Guide
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 · 67 lines · 11 tokens per session scan A 6cbe0b33f5ca

Subscribe to this mod's changes

debug-memory is a skill published in the GitHub repository jmagly/aiwg (205 stars, last pushed 4d ago), licensed MIT. It adds 11 tokens to every session and 452 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-30.