Episodic memory plugin does not index subagent conversation files

Resolved 💬 2 comments Opened Mar 27, 2026 by skinnyandbald Closed Mar 27, 2026

Bug Description

The episodic-memory plugin (superpowers-marketplace, v1.0.15) only indexes top-level .jsonl session files in ~/.claude/projects/<project>/. It does not discover or index subagent conversation files stored in ~/.claude/projects/<project>/<sessionId>/subagents/*.jsonl.

This means any conversation that happened via a dispatched subagent (Agent tool) is invisible to episodic memory search, even though the full conversation data exists on disk.

Steps to Reproduce

  1. Have a session where Claude dispatches work to subagents (e.g., via the Agent tool for research, exploration, etc.)
  2. The subagent conversation is stored in ~/.claude/projects/<project>/<sessionId>/subagents/agent-<id>.jsonl
  3. In a later session, use episodic-memory:search-conversations to search for content from that subagent conversation
  4. No results found — the content is not indexed

Evidence

Verified by querying the SQLite index directly:

-- Parent session IS indexed (36 exchanges)
SELECT COUNT(*) FROM exchanges WHERE session_id = '24ea1b5d-45b2-48e0-a675-3b6036191520';
-- Returns: 36

-- Subagent sessions are NOT indexed (0 exchanges)
SELECT COUNT(*) FROM exchanges WHERE session_id LIKE 'agent-%';
-- Returns: 0

The actual conversation content exists in the subagent JSONL files on disk (confirmed via grep), but the indexer never scans the <sessionId>/subagents/ subdirectories.

Root Cause

In src/indexer.ts, the file discovery only scans for *.jsonl at the top level of each project directory. It does not recurse into session subdirectories where subagent files are stored.

Expected Behavior

Subagent conversation files should be indexed and searchable via episodic memory. These often contain the most detailed and valuable parts of a conversation (deep research, code analysis, exploration) since the parent session typically only has a brief summary of what the subagent returned.

Impact

  • Users lose access to potentially the most valuable parts of their conversation history
  • Subagent-heavy workflows (research, parallel exploration, code review) are disproportionately affected
  • Users may believe session data was lost when it's actually just not indexed

Environment

  • Claude Code Desktop (macOS)
  • episodic-memory plugin v1.0.15 (superpowers-marketplace)
  • ~5,193 session files, 48 projects

View original on GitHub ↗

This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗