Claude Code session
Claude Compaction Viewer
A TUI and CLI tool for inspecting Claude Code conversation history and compaction events.
Install
uv tool install claude-compaction-viewerFound in the project README. Check it for setup steps after installing.
git clone https://github.com/swyxio/claude-compaction-viewer.gitFrom the README
Claude Code Compaction Viewer A TUI and CLI tool for inspecting Claude Code conversation history and compaction events. What is compaction? When a Claude Code session runs long, the context window fills up. Rather than crashing or losing everything, Claude Code performs compaction: it inserts a boundary marker in the conversation, generates a structured summary of everything before it, and continues with the summary replacing the full history in the active context. The full conversation is preserved on disk in JSONL files at ~/.claude/projects/. This tool lets you see exactly what happened: - Where compaction boundaries were inserted - What the compressed summary contains (the "outcome" of compaction) - How many tokens were in context before each compaction triggered - Whether compaction was auto-triggered or manual (/compact) Inspired by Tal Raviv's article on doing "brain surgery" on Claude Code. Install Usage Scan all conversations for compactions Prints a table of every Claude Code conversation across all your projects, highlighting which ones have compaction events: View compaction summaries Prints full details for each compaction event — the trigger, token count, and the complete summary text that Claude sees after compaction. Interactive TUI Launches a full terminal UI: - Left sidebar: tree of all Claude Code projects and conversation files - Stats bar: message counts, token usage, model, duration - Compaction bar: highlighted summary of all compaction events - Message table: scrollable list of every message (user, assistant, tool calls, system) - Detail panel: full content of selected message with metadata TUI Keybindings You can also open a specific file directly: How Claude Code stores conversations Claude Code saves every conversation as a…
Details
- Repository
- swyxio/claude-compaction-viewer
- Language
- Python
- License
- MIT
- Last updated
- 5 March 2026
FAQ
What is Claude Compaction Viewer?
A TUI and CLI tool for inspecting Claude Code conversation history and compaction events. It is a session for Claude Code, from swyxio/claude-compaction-viewer on GitHub.
How do I install Claude Compaction Viewer?
Run uv tool install claude-compaction-viewer, then follow the setup in the README.
Is Claude Compaction Viewer popular?
swyxio/claude-compaction-viewer has 74 GitHub stars and 3 forks. It was last updated on 5 March 2026.
More sessions & history
Codesyncer
69bitjaru/codesyncer
Claude forgets everything when the session ends. CodeSyncer makes it remember.
Workflow
67truongfelix/workflow
A Claude Code workflow for long projects: short context, decisions remembered, lessons that stick across sessions
Pixel Agents Standalone
56rolandal/pixel-agents-standalone
Standalone web app that visualizes Claude Code sessions as pixel art characters in a virtual office. Fork of pablodelucca/pixel-agents.
Claude Relay
61vildanbina/claude-relay
Cross-session messaging for Claude Code. Ask one session, get answers from another, all in natural language
CC Session Reader
66Mapleeeeeeeeeee/cc-session-reader
Read Claude Code session transcripts and emit a compact summary — 80%+ token reduction, no LLM, pure static extraction.
Applytwin
64OjasMishra32/applytwin
Your job search on autopilot: finds every role that fits you, tailors your resume for each, and applies through your own Claude Code or Codex. Free to use.
Browse the most popular Claude Code mods, all sessions & history, or the skills and MCP server directories.