Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Claude Session LensNew to Visual Studio Code? Get it now.
Claude Session Lens

Claude Session Lens

Halcyon Logic

|
3 installs
| (0) | Free
Live session transcripts with expandable tool calls for Claude Code.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Claude Session Lens

Live session transcripts with expandable tool calls for Claude Code. The only extension with an MCP server that makes Claude aware of its own session history.

Features

Transcript View — Timestamps on every message, collapsible tool call groups, clickable file paths (validated against filesystem), markdown rendering, full-text search, and an "Open full" button for long messages.

Subagent Drill-Down — Background and foreground agent entries expand inline to show the agent's full transcript: user prompts, assistant responses, tool calls. Recursive — sub-subagents are expandable too. Lazy-loaded on first click.

Session Management — Live updates, sorted by modification time, right-click to rename. Browse hidden sessions and unhide them (takes effect on full VS Code restart). Title chain: custom > AI > first user message > session ID.

On-Demand History — Recent messages load first (configurable page size). Sticky banner to load earlier messages with scroll position preserved.

Save Game — Save a session summary (.summary.md) for quick resume in future conversations. Opens in markdown preview for immediate readability. Supports multiple checkpoints per session.

Auto-Save on /clear — When you run /clear in Claude Code, the extension detects the new session, automatically saves a summary for the predecessor, and renames it with "(prior)" so you can distinguish old from new in the session list.

Export — Export the active session as Markdown or HTML.

Cost & Token Tracking — Estimated session cost, last-turn input tokens, and cache hit rate in the budget bar, plus a per-turn price on each assistant message (hover for the input/output/cache split and the model). A response written as several transcript lines is priced once, so the per-turn figures add up to the session total. Each metric toggleable in settings. Built-in Anthropic list prices apply by default; modelRates overrides them per model family with granular input/output/cache rates.

Context Meter — A bar under the budget bar shows how full the context window is, measured from the last request's input plus cache. Turns yellow at 70% and red at 90%, so you can see a compaction coming before starting large work. The window is inferred from the session's model (1M, or 200K for Haiku) and overridable with contextWindowTokens.

Budget Display — Optional LiteLLM gateway integration shows spend, limit, and reset date when ANTHROPIC_BASE_URL and ANTHROPIC_AUTH_TOKEN are configured. Without a gateway, falls back to an estimated month-to-date spend computed from your transcripts.

Keyword Index — SQLite FTS5 index across all projects: search by ticket ID, tool name, file path, or content, with BM25 ranking. Auto-incremental indexing on file changes touches only the changed session. Manual rebuild via Command Palette.

Analytics — The graph icon in the session panel title bar (or Command Palette > Claude Session Lens: Show Analytics) opens a dashboard in the editor area:

  • Activity — day heatmap, hour-of-day by weekday grid, tool usage breakdown, messages per day. The date range picker covers 30 days to all time; when history is shorter than the window, a note explains that Claude Code's cleanupPeriodDays deleted the rest and how to change it.
  • Cost — spend per day, per project, and per model; 7- and 30-day burn rate with month-end projection; most expensive sessions.

Scope the whole dashboard with the picker at the top: everything, one project, or one session.

  • Recent Edits — every file created or edited across all sessions, newest first, filterable by project and filename. Click a file to open it; click a row to jump to the message that made the change, even in another project.

Layout — Side-by-side or stacked, resizable session panel, persists across sessions. Markdown files open in preview mode.

MCP Server

A read-only MCP server lets Claude query your session history mid-conversation — the only extension in the marketplace with this capability. Claude can search past sessions, find related work, look up file history, and grep through message content without you leaving the terminal.

Install: Command Palette > Claude Session Lens: Install MCP Server

Registers claude-session-lens in ~/.claude.json. Ten tools:

Tool Description
list_sessions List recent sessions with titles, dates, ticket IDs
search_sessions FTS5 keyword search, BM25-ranked (title/tickets 3x, files 2x, tools/snippets 1x)
get_session_messages Read messages with pagination
get_session_summary Get save game file or lightweight metadata
get_current_session Current session context, progress, and recent messages for "what have we done so far?"
get_file_history Which sessions touched a given file and why
get_recent_edits Files recently created or edited across all sessions, newest first
get_usage_stats Token and cost stats: per-day, burn rate, by model and by project
find_related_sessions Sessions sharing tickets or files with a given session
search_message_content Deep grep through message text for errors, stack traces, or patterns

Claude Code Skill

A bundled skill lets Claude search your past transcripts naturally.

Install: Command Palette > Claude Session Lens: Install Skill

Use /session-lookup or ask naturally — searches by ticket ID, file name, tool name, or any keyword across all projects. Prefers MCP tools when the server is connected, falls back to PowerShell scripts.

Settings

Setting Default Description
maxMessages 500 Messages per page (0 = unlimited)
showToolCalls true Show tool call entries in transcript
stackedLayout false Stacked vs side-by-side layout
timestampFormat both relative, absolute, or both
transcriptPath "" Override transcript directory
showSessionCost true Session cost in the session list
showLastTurnInput true Last turn's input tokens in budget bar
showCacheHitRate true Cache hit rate in budget bar
showContextMeter true Context-window fullness bar
showMessageCost true Per-turn cost on each assistant message
contextWindowTokens 0 Context window for the meter (0 = infer from the session's model)
modelRates {} Cost per 1M tokens by model family (input, output, cacheWrite, cacheRead). Empty = built-in list prices
searchCaseInsensitive true Case-insensitive keyword search
searchStemming true Match word stems
searchProximity true Boost score for nearby terms
searchTrigramFuzzy false Fuzzy matching for typos
searchAliases false Expand terms via alias file
searchAliasFile "" Path to alias JSON

All settings are under the claudeSessionLens namespace.

Commands

Command Description
Refresh Reload all sessions
Show All Sessions Clear workspace filter
Export Session Export active session as Markdown or HTML
Save Session Summary Save a .summary.md for the active session
Install Skill Install the Claude Code skill
Install MCP Server Register the MCP server in Claude settings
Build Keyword Index Rebuild the cross-project search index
Show Analytics Open the Activity / Cost / Recent Edits dashboard (also a title-bar button)

Install

From source:

npm install
npm run compile
npx @vscode/vsce package
code --install-extension claude-session-lens-1.1.3.vsix --force

License

MIT

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft