Manages task-scoped memory lifecycle in Claude Code using typed MnemoGraph with per-node eviction policies and fatigue monitoring to prevent lossy context compaction. Use for durable checkpoints and handoffs across compactions.
npx claudepluginhub joshuarweaver/cascade-code-languages-misc-2 --plugin alinaqi-claude-bootstrapThis skill uses the workspace's default tool permissions.
Mnemos prevents lossy context compaction from destroying the structured knowledge you need most. It treats your working memory as a **typed graph** (MnemoGraph) where different types of knowledge have different eviction policies:
Searches, retrieves, and installs Agent Skills from prompts.chat registry using MCP tools like search_skills and get_skill. Activates for finding skills, browsing catalogs, or extending Claude.
Searches prompts.chat for AI prompt templates by keyword or category, retrieves by ID with variable handling, and improves prompts via AI. Use for discovering or enhancing prompts.
Checks Next.js compilation errors using a running Turbopack dev server after code edits. Fixes actionable issues before reporting complete. Replaces `next build`.
Mnemos prevents lossy context compaction from destroying the structured knowledge you need most. It treats your working memory as a typed graph (MnemoGraph) where different types of knowledge have different eviction policies:
Mnemos monitors 4 dimensions of "agent fatigue" — all passively observed from hook data, no manual input needed:
| Dimension | Weight | Signal Source | What It Measures |
|---|---|---|---|
| Token utilization | 0.40 | Statusline JSON | How full the context window is |
| Scope scatter | 0.25 | PreToolUse file paths | How many directories the agent is bouncing between |
| Re-read ratio | 0.20 | PreToolUse Read calls | How often the agent re-reads files it already read (context loss) |
| Error density | 0.15 | PostToolUse outcomes | What fraction of tool calls are failing (agent struggling) |
Fatigue states and actions:
| State | Score | Action |
|---|---|---|
| FLOW | 0.0–0.4 | Normal operation |
| COMPRESS | 0.4–0.6 | Micro-consolidation runs (compress 3 ResultNodes, evict 1 cold ContextNode) |
| PRE-SLEEP | 0.6–0.75 | Checkpoint written, consolidation runs |
| REM | 0.75–0.9 | Emergency checkpoint, consider wrapping up |
| EMERGENCY | 0.9+ | Checkpoint written, hand off immediately |
fatigue.json on every API callWhen Claude Code compacts the context (~83% full), Mnemos uses two layers:
mnemos-post-compact-inject.sh which detects the .mnemos/just-compacted marker and re-injects the full checkpoint. This is the guaranteed path — it doesn't depend on the summarizer.The result: after compaction, you'll see a "CONTEXT RESTORED AFTER COMPACTION" block with your goal, constraints, what you were working on, and progress. Resume from there.
mnemos init # Initialize .mnemos/
mnemos status # Show node counts + fatigue
mnemos fatigue # Detailed fatigue breakdown
mnemos checkpoint --force # Write checkpoint now
mnemos resume # Output checkpoint for context
mnemos consolidate # Run micro-consolidation
mnemos nodes --type goal # List active GoalNodes
mnemos add goal "Build auth" # Add a GoalNode
mnemos bridge-icpg # Import iCPG ReasonNodes
When working on a task:
mnemos add goal "what you're trying to achieve" --task-id session-1mnemos add constraint "API backward compatibility" --scope src/api/mnemos fatiguemnemos checkpointMnemos bridges with iCPG (Intent-Augmented Code Property Graph):
mnemos bridge-icpg imports active ReasonNodes as GoalNodesEverything lives in .mnemos/ (gitignored):
mnemo.db — SQLite MnemoGraphfatigue.json — Live token metrics (updated per API call by statusline)signals.jsonl — Behavioral signal log (appended by PreToolUse + PostToolUse hooks)checkpoint-latest.json — Most recent checkpointcheckpoints/ — Archived checkpoints