
Security News
Socket Releases Free Certified Patches for Nuxt Security Vulnerabilities
Socket releases free Certified Patches for high-severity Nuxt vulnerabilities, including server-side remote code execution through server island props.
@tyroneross/claude-code-debugger
Advanced tools
Debugging memory system for Claude Code - never solve the same bug twice
Never solve the same bug twice
A debugging memory system for Claude Code that automatically learns from past incidents and suggests solutions based on similar problems you've already solved.
.claude/audit files when manual storage is missed.claude/memory/~/.claude-code-debugger/ for cross-project learning# npm
npm install @tyroneross/claude-code-debugger
# pnpm
pnpm add @tyroneross/claude-code-debugger
# yarn
yarn add @tyroneross/claude-code-debugger
# npm
npm install -g @tyroneross/claude-code-debugger
# pnpm
pnpm add -g @tyroneross/claude-code-debugger
# yarn
yarn global add @tyroneross/claude-code-debugger
pnpm store mismatch error:
If you see ERR_PNPM_UNEXPECTED_STORE, your project has a local .pnpm-store directory. Fix with:
rm -rf .pnpm-store node_modules
pnpm install
npm/pnpm conflict:
If your project uses pnpm (has pnpm-lock.yaml), always use pnpm add instead of npm install.
# Check current configuration
claude-code-debugger config
# Show memory statistics
claude-code-debugger status
# Search memory before debugging
claude-code-debugger debug "Search filters not working"
# Search for specific incidents
claude-code-debugger search "react hooks"
# Suggest patterns to extract
claude-code-debugger patterns
# Extract and store patterns
claude-code-debugger patterns --extract
# Mine audit trail for missed incidents
claude-code-debugger mine --days 30
# Store mined incidents
claude-code-debugger mine --days 30 --store
# Batch operations (v1.2.0) ✨ NEW
claude-code-debugger batch --incomplete # Review incomplete incidents
claude-code-debugger batch --extract-patterns # Extract patterns from existing data
claude-code-debugger batch --cleanup --older-than 90 # Clean up old sessions
import {
debugWithMemory,
storeDebugIncident,
checkMemory,
extractPatterns,
mineAuditTrail
} from '@tyroneross/claude-code-debugger';
// Before debugging: Check for similar incidents
const result = await debugWithMemory("Search filters not working", {
min_confidence: 0.7
});
console.log('Session ID:', result.context_used.session_id);
// After fixing: Store the incident
await storeDebugIncident(sessionId, {
root_cause: {
description: "Missing useMemo dependency caused infinite re-renders",
category: "react-hooks",
confidence: 0.9
},
fix: {
approach: "Added missing dependency to useMemo array",
changes: ["components/SearchBar.tsx"],
time_to_fix: 15
},
verification: {
status: 'verified',
regression_tests_passed: true,
user_journey_tested: true,
success_criteria_met: true
}
});
// Search memory directly
const memory = await checkMemory("infinite render loop", {
similarity_threshold: 0.5,
max_results: 5
});
// Extract patterns from incidents
const patterns = await extractPatterns({
min_incidents: 3,
min_similarity: 0.7,
auto_store: true
});
// Mine audit trail
const incidents = await mineAuditTrail({
days_back: 30,
auto_store: true,
min_confidence: 0.7
});
Use interactive prompts to ensure high-quality incident documentation:
import { storeIncident, generateIncidentId } from '@tyroneross/claude-code-debugger';
// Create a minimal incident
const incident = {
incident_id: generateIncidentId(),
timestamp: Date.now(),
symptom: 'Search results not displaying',
root_cause: {
description: 'React component issue',
category: 'react',
confidence: 0.7
},
// ... minimal details
};
// Store with interactive mode - system will prompt for missing details
const result = await storeIncident(incident, {
interactive: true, // Enable guided prompts
validate_schema: true
});
// The system will:
// 1. Check root cause quality (min 50 chars)
// 2. Ask about verification status
// 3. Suggest tags based on symptom
// 4. Calculate quality score
// 5. Show feedback and confirm storage
Quality Scoring:
Quality Targets:
See Interactive Verification Guide for details.
Local Mode (default)
.claude/memory/ directoryShared Mode
~/.claude-code-debugger/ globally# Use shared mode for this command
claude-code-debugger status --shared
# Set shared mode via environment variable
export CLAUDE_MEMORY_MODE=shared
claude-code-debugger status
# In code
import { getConfig } from '@tyroneross/claude-code-debugger';
const config = getConfig({
storageMode: 'shared'
});
# Storage mode: 'local' or 'shared'
CLAUDE_MEMORY_MODE=shared
# Custom memory path (overrides mode defaults)
CLAUDE_MEMORY_PATH=/custom/path/to/memory
Each incident captures:
When 3+ similar incidents are detected:
Pattern-First Approach:
Recover incidents from .claude/audit/ files:
debug <symptom>Check memory for similar incidents before debugging.
claude-code-debugger debug "Search filters not working"
claude-code-debugger debug "API timeout" --threshold 0.6
claude-code-debugger debug "Infinite render loop" --shared
Options:
--shared: Use shared memory mode--threshold <number>: Similarity threshold (0-1, default: 0.5)statusShow memory system statistics.
claude-code-debugger status
claude-code-debugger status --shared
configDisplay current configuration.
claude-code-debugger config
search <query>Search memory for incidents matching a query.
claude-code-debugger search "react hooks"
claude-code-debugger search "API error" --threshold 0.6
Options:
--shared: Use shared memory mode--threshold <number>: Similarity threshold (default: 0.5)patternsSuggest or extract patterns from incidents.
# Preview patterns that could be extracted
claude-code-debugger patterns
# Extract and store patterns
claude-code-debugger patterns --extract
Options:
--extract: Extract and store patterns (vs just preview)--shared: Use shared memory modemineMine audit trail for incidents not manually stored.
# Preview what would be mined
claude-code-debugger mine --days 30
# Mine and store incidents
claude-code-debugger mine --days 30 --store
Options:
--days <number>: Days to look back (default: 30)--store: Store mined incidents (vs just preview)--shared: Use shared memory modedebugWithMemory(symptom, options)Check memory before debugging and prepare for storage.
const result = await debugWithMemory("symptom description", {
agent: 'coder',
auto_store: true,
min_confidence: 0.7
});
Returns: DebugResult with session ID and memory context
storeDebugIncident(sessionId, incidentData)Store incident after debugging is complete.
await storeDebugIncident(sessionId, {
root_cause: { ... },
fix: { ... },
verification: { ... }
});
checkMemory(symptom, config)Search memory for similar incidents.
const memory = await checkMemory("symptom", {
similarity_threshold: 0.5,
max_results: 5,
temporal_preference: 90,
memoryConfig: { storageMode: 'shared' }
});
Returns: RetrievalResult with patterns and/or incidents
extractPatterns(options)Extract reusable patterns from incidents.
const patterns = await extractPatterns({
min_incidents: 3,
min_similarity: 0.7,
auto_store: true,
config: { storageMode: 'shared' }
});
mineAuditTrail(options)Recover incidents from audit trail.
const incidents = await mineAuditTrail({
days_back: 30,
auto_store: true,
min_confidence: 0.7,
config: { storageMode: 'shared' }
});
import {
storeIncident,
loadIncident,
loadAllIncidents,
storePattern,
loadPattern,
loadAllPatterns,
getMemoryStats
} from '@tyroneross/claude-code-debugger';
import { getConfig, getMemoryPaths } from '@tyroneross/claude-code-debugger';
const config = getConfig({
storageMode: 'shared',
autoMine: false,
defaultSimilarityThreshold: 0.7
});
const paths = getMemoryPaths(config);
// paths.incidents, paths.patterns, paths.sessions
All TypeScript types are exported:
import type {
Incident,
Pattern,
RootCause,
Fix,
Verification,
QualityGates,
RetrievalResult,
MemoryConfig
} from '@tyroneross/claude-code-debugger';
your-project/
└── .claude/
└── memory/
├── incidents/ # Individual incident JSON files
├── patterns/ # Extracted pattern JSON files
└── sessions/ # Temporary debug session files
~/.claude-code-debugger/
├── incidents/ # All incidents from all projects
├── patterns/ # All patterns from all projects
└── sessions/ # Temporary session files
Include in your agent prompts:
Before debugging, check memory:
- Run: `npx claude-code-debugger debug "symptom description"`
- Review similar incidents and patterns
- Apply known solutions if confidence is high
After fixing:
- Store incident with: `npx claude-code-debugger store`
- Or use programmatic API from TypeScript
Set up periodic audit mining:
# Weekly cron job to mine audit trail
0 0 * * 0 cd /path/to/project && npx claude-code-debugger mine --days 7 --store
claude-code-debugger debug "symptom" --threshold 0.7
Include all fields for maximum reuse:
# Weekly pattern extraction
claude-code-debugger patterns --extract
# Monthly audit mining
claude-code-debugger mine --days 30 --store
export CLAUDE_MEMORY_MODE=shared
git clone https://github.com/tyroneross/claude-code-debugger.git
cd claude-code-debugger
npm install
npm run build
npm test
npm run watch
# Update version in package.json
npm version patch|minor|major
# Build
npm run build
# Publish to GitHub Packages
npm publish
This package uses semantic versioning:
npm list @tyroneross/claude-code-debuggerclaude-code-debugger status to see statistics.claude/memory/~/.claude-code-debugger/ permissionsContributions welcome! Please:
MIT
Never solve the same bug twice. 🧠
FAQs
Coding Debugger for Claude Code and Codex: debugging memory, verdict-first retrieval, root-cause workflows, context compression, and parallel assessment.
The npm package @tyroneross/claude-code-debugger receives a total of 39 weekly downloads. As such, @tyroneross/claude-code-debugger popularity was classified as not popular.
We found that @tyroneross/claude-code-debugger demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Socket releases free Certified Patches for high-severity Nuxt vulnerabilities, including server-side remote code execution through server island props.

Security News
An open letter signed by 50 companies, from NVIDIA and Microsoft to Mistral and Hugging Face, urges Washington not to restrict open weight AI.

Security News
/Research
A fake corepack.org site is impersonating the Node.js tool and delivers an infostealer and proxyware to developers who download it.