subagent-memory

Maintain persistent observational memory for autonomous subagents via MEMORY.md.

2|1|Updated Apr 29, 2026
One-click install
npx skills add https://github.com/fourcolors/luna --skill subagent-memory
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: subagent-memory
Source: https://github.com/fourcolors/luna/tree/main/seeds/skills/subagent-memory
Command: npx skills add https://github.com/fourcolors/luna --skill subagent-memory

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps autonomous subagents retain useful context across invocations without letting their memory files become noisy, repetitive, or too large for prompt injection.

Core Features & Use Cases

  • Reload Historical Context: Read MEMORY.md at the start of each task so the subagent can recall prior observations and repository-specific patterns.
  • Chronological Observation Logging: Append dated bullets with priority emojis to capture critical lessons, useful facts, and completed milestones.
  • Memory Compression: Run a reflection pass before the file approaches the harness limit so the most important knowledge stays compact and usable.
  • Use Case: A long-running codebase analyzer can remember file paths, hard constraints, and prior discoveries across many separate runs without losing signal.

Quick Start

Tell the subagent to use subagent-memory so it rereads MEMORY.md, records new observations at task end, and compresses the file before it grows too large.

Frequently Asked Questions about subagent-memory

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I maintain persistent memory for autonomous subagents across repeated invocations?

To maintain persistent memory for autonomous subagents, use a single MEMORY.md file per agent to reload historical context at the start of each task and append dated observations at the end.

What's the best way to compress subagent memory before it exceeds the prompt injection limit?

The best way to compress subagent memory is to run a reflection-based compression pass before the MEMORY.md file approaches the 200-line harness limit, preserving the most important knowledge.

How does priority-emoji bullet logging work for chronological context retention?

Priority-emoji bullet logging works by appending dated bullets with specific emojis to capture critical lessons, useful facts, and completed milestones in chronological order within MEMORY.md.

Does subagent-memory work without external dependencies or components?

Yes, subagent-memory works without external dependencies or components, relying solely on markdown file manipulation to record dated learnings and preserve chronological context across repeated tasks.

Why does my autonomous subagent lose repository-specific patterns between separate runs?

Your autonomous subagent loses repository-specific patterns because it lacks persistent observational memory, which can be fixed by rereading MEMORY.md at task start and recording new observations at task end.

When should I not use a single markdown file for subagent context retention?

You should not use a single markdown file for subagent context retention if your agent's observations exceed the 200-line harness limit without compression, as this degrades prompt injection signal quality.