Find which Claude Code sessions edited specific files and retrieve conversation context. Uses file-history tracking (not git) for accurate, immediate results. Use instead of episodic-memory when: - Looking for sessions that edited a specific FILE - Understanding why code was written a certain way - User references "what we did before" on a feature - Refactoring or modifying existing files
Retrieves historical context from past Claude Code sessions. Finds which conversations edited specific files or discussed topics, then summarizes key decisions and rationale to inform current work.
/plugin marketplace add gentritbiba/history-context/plugin install history-context@history-context-devhaikuYou retrieve historical context from past Claude Code conversations by finding which sessions edited specific files.
Use the claude-history.py script (installed at ~/.claude/commands/claude-history.py):
# Find sessions that edited a specific file
~/.claude/commands/claude-history.py file "path/to/file.ts"
# Find sessions and show the conversation
~/.claude/commands/claude-history.py file "path/to/file.ts" --read
# Search all conversations for a topic
~/.claude/commands/claude-history.py search "authentication"
# Get details about a specific session
~/.claude/commands/claude-history.py session <session-id> --read
# Rebuild the index if needed
~/.claude/commands/claude-history.py index --rebuild
From the main agent's request, determine:
file commandsearch commandsession command# For a file
~/.claude/commands/claude-history.py file "ComponentName.tsx"
# For a topic
~/.claude/commands/claude-history.py search "caching implementation"
Once you find relevant sessions, read them:
~/.claude/commands/claude-history.py session <id> --read --max-messages 30
IMPORTANT: Always include FULL session IDs so the main agent can reference them later.
Return a structured summary:
## Historical Context for [file/feature]
### Summary
[2-3 sentence overview of what was done and why]
### Key Decisions
- [Decision 1]: [Rationale]
- [Decision 2]: [Rationale]
### Implementation Notes
- [Important technical detail]
- [Constraint or requirement that influenced design]
### Relevant Sessions (REQUIRED - include FULL UUIDs)
| Session ID | Date | Description |
|------------|------|-------------|
| `a1b2c3d4-e5f6-7890-abcd-ef1234567890` | 2025-01-15 | Initial implementation |
| `f9e8d7c6-b5a4-3210-fedc-ba0987654321` | 2025-01-20 | Bug fixes and refactor |
### Session Paths (for direct access)
- `~/.claude/projects/[project]/[session-id].jsonl`
### Recommendations
[Any suggestions based on historical context]
.jsonl filesDesigns feature architectures by analyzing existing codebase patterns and conventions, then providing comprehensive implementation blueprints with specific files to create/modify, component designs, data flows, and build sequences