gapmiss46 downloadsView Claude Code sessions. Browse, search, analyze, & export your sessions as interactive timelines with live watch & rich tool rendering — right alongside your notes.
An Obsidian plugin for viewing Claude Code sessions. Browse, search, analyze, and export your Claude Code sessions as interactive timelines with live watch and rich tool rendering — right alongside your notes.
Local-first and private. Claude Sessions reads your JSONL session files directly from disk — no uploads, no syncing, no external services. Your conversations stay on your machine.
[!IMPORTANT] v0.3.2 — Desktop-only. Active development; expect frequent changes.
Every tool type gets purpose-built rendering:
Bash — syntax-highlighted code block with command description; diff detection for unified diff output
Edit — red/green diff view (success messages hidden; errors shown)
Write — syntax-highlighted code with language detection from file extension
Read — language-specific syntax highlighting
AskUserQuestion — header badges, option cards with selected/rejected state, answer summary, copy raw JSON
ToolSearch — matched tool names with icons and deferred tool count
MCP tools — displayed as server / tool_name instead of raw mcp__server__tool
Sub-agent sessions — inline with collapsible prompt, tool groups, and output (supports both legacy inline and separate JSONL file formats)
Tool grouping — consecutive calls above a configurable threshold (default 4) collapse into a summary bar
Orphan detection — tool calls without results show "in progress" (last turn) or "interrupted" (mid-session)
Tool result images rendered as clickable thumbnails with full-size modal
Collapsible panel at the top of each session:
Dual-mode search panel in the right sidebar:
Convert sessions into structured Obsidian notes with queryable frontmatter — zero LLM cost (Layer 0 extraction).
/distill skill) with exact session stats.base templates for aggregate views:Distilled notes are ideal for:
/distill WorkflowSince /distill runs in Claude Code (not Obsidian), it outputs to stdout with a placeholder session_id. To get accurate metadata merged with your narrative:
/distill at the end of your sessionThe plugin will:
session_id from the active sessionfiles_touched and tags arrays from both sourcesTo install this skill globally for all projects:
cp -r .claude/skills/distill ~/.claude/skills/
Then run /distill at the end of any Claude Code session.
Collapsible panel showing session-level context:
Inline indicators on tool calls: zap icon for PreToolUse hooks, shield icon for PermissionRequest.
--cs-*) for colors, spacing, typography, and dimensionsOpen sessions directly via protocol handler:
obsidian://claude-sessions?session=/path/to/session.jsonl&turn=7
Paths can use ~ for the home directory, e.g. obsidian://claude-sessions?session=~/.claude/projects/.../session.jsonl.
gapmiss/claude-sessionsCopy main.js, styles.css, and manifest.json into:
<your-vault>/.obsidian/plugins/claude-sessions/
Restart Obsidian and enable the plugin under Settings → Community plugins.
git clone https://github.com/gapmiss/claude-sessions.git
cd claude-sessions
npm install
npm run build
Ctrl/Cmd+P)Run Claude Sessions: Import session file — drag-and-drop a .jsonl file, use the file picker, or paste a path.
With a session open, run Export session to Markdown or Export session to HTML.
To add LLM-generated summaries:
/distill on your session.base file to see aggregate session data (requires Obsidian 1.8+ with Bases enabled)| Command | Description |
|---|---|
| Browse sessions | Open a session from the fuzzy search modal |
| Search sessions | Open the cross-session search panel |
| Search in session | Search within the active session |
| Import session file | Open a session from file path or drag-and-drop |
| Export session to Markdown | Export as Markdown with frontmatter |
| Export session to HTML | Export as self-contained HTML |
| Expand all turns | Expand all collapsed turns |
| Collapse all turns | Collapse all turns |
| Expand all blocks | Expand all tools, thinking blocks, and summary |
| Collapse all blocks | Collapse all tools, thinking blocks, and summary |
| Refresh session | Re-read and re-render the current session |
| Toggle live watch | Start/stop watching the session file for changes |
| Copy resume to clipboard | Copy claude --resume <id> command |
| Distill session to note | Create/update a structured note with session stats |
Merge /distill output from clipboard |
Combine LLM summary with Layer 0 frontmatter |
| Install bases dashboard templates | Add Obsidian Bases templates to your vault |
| Setting | Default | Description |
|---|---|---|
| Session directories | ~/.claude/projects |
Directories to scan for JSONL files (supports ~) |
| Export folder | Claude sessions |
Vault folder for exported files |
| Distill folder | Claude sessions/distilled |
Vault folder for distilled session notes |
| Bases folder | Claude sessions/bases |
Vault folder for Obsidian Bases dashboard templates |
| Show thinking blocks | On | Display thinking/reasoning blocks |
| Show tool calls | On | Display tool use blocks |
| Show tool results | On | Display tool result output |
| Content width | 960px | Maximum width of session content (presets: 680–1200px or full) |
| Tool group threshold | 4 | Consecutive tool calls above this collapse into a group |
| Auto-scroll on update | On | Scroll to bottom on live watch changes |
| Notify on pending tool | Off | System notification when a tool call awaits permission |
| Show rate limits | Off | Display Claude account rate limit utilization (5-hour and weekly) |
The Claude Code JSONL format stores each content block (text, thinking, tool_use) as a separate record. The parser:
subagents/agent-<id>.jsonl filesThe timeline view renders all turns immediately into a scrollable container. An IntersectionObserver drives scroll-based opacity. Tool-specific renderers handle Bash, Edit, Write, Read, AskUserQuestion, and ToolSearch with syntax highlighting, diff views, and structured displays.
[!WARNING] Claude Code automatically deletes session files older than 30 days by default. If you're using this plugin for cost tracking, session analysis, or building a knowledge base from past conversations, you'll want to extend this.
Add to ~/.claude/settings.json:
{
"cleanupPeriodDays": 365
}
Other plugins can access session data via the public API:
const api = app.plugins.plugins['claude-sessions']?.api as ClaudeSessionsAPI;
// Get the active session
const session = api.getActiveSession();
// Parse a JSONL file
const session = await api.parseSessionFile('/path/to/session.jsonl');
// Subscribe to session load/reload events
const unsubscribe = api.onSessionParsed((session) => {
console.log('Session loaded:', session.metadata.project);
});
// Get all indexed sessions (lightweight metadata)
const entries = await api.getSessionIndex();
npm install
npm run dev # watch mode with source maps
npm run build # typecheck + production bundle
npm test # vitest
npm run test:watch # watch mode tests
npx eslint . # lint with eslint-plugin-obsidianmd
fs access)