claude-session-logger

Session logging, command history, and auto-naming for Claude Code
A hook-based extension for Claude Code that provides persistent session logging, automatic session naming from your working directory, and transcript discovery via symlinks.
Features
- Session Logging - Log all tool calls to session-specific files in
~/.claude/sesslogs/
- Auto-Naming - Sessions automatically named from working directory (e.g.,
c--code or my-project)
- Transcript Symlinks - Easy access to transcript files via
transcript.jsonl in sesslog directories
- Run Tracking - Track multiple runs within a session with run markers
- Task Logging - Dedicated logging for TaskCreate/TaskUpdate/TaskList operations
- Subagent Capture - Each subagent's own tool calls, narration, thinking and final report land in its own file, bracketed by start and stop lines
- Thinking - Claude's reasoning is recorded alongside what it said, as
{THINK: ...} and {AGENT-THINK:<type> ...}; switchable per channel or off entirely
- Two Timelines -
.sesslog_* is everything; .sesslog-main_* is the same session with the agents' internal work left out
- Failed Calls Marked - A tool call that fails is logged like any other, with its reason inline:
{Edit: path [FAILED: anchor not found] }
- AI Rename -
/renameAI command for AI-assisted session naming
- Session Info -
/sessioninfo command to inspect current session state
Quick Start
claude plugin marketplace add "DazzleML/claude-session-logger"
claude plugin install session-logger@dazzle-claude-plugins
Requires the native Claude Code installer (not npm). For other install methods (local clone, manual) and for troubleshooting see the Installation Guide.
Updating
claude plugin marketplace update dazzle-claude-plugins
claude plugin update session-logger@dazzle-claude-plugins
(Note: claude plugin install does not update an existing install.) For additional details on verifying versions, multi-user machines, etc. see the Updating section of the Installation Guide.
Usage
Automatic Session Logging
Once installed, all Claude Code sessions are automatically logged to:
~/.claude/sesslogs/{session-name}__{session-id}_{user}/
├── .sesslog_*.log # Everything, one timeline (tool calls, prose, thinking, agents)
├── .sesslog-main_*.log # The same session without the agents' internal work
├── .shell_*.log # Shell command output
├── .tools_*.log # Tool calls without prose
├── .tasks_*.log # Task operations log
├── .convo_*.log # User prompts, AI responses, agent dialogue
├── .agents_*.log # Subagent activity
├── .agents-<type>_*.log # One file per agent type: its dispatch, work, thinking and report
├── .unknowns_*.log # Tools the plugin doesn't recognize yet
└── transcript.jsonl # Symlink to transcript file
Every channel is configurable and a few more ship switched off — see the Configuration Guide.
Auto-Naming Examples
Sessions are automatically named based on your working directory:
| Working Directory | Auto-Generated Name |
|---|
C:\code\my-project | my-project |
C:\code | c--code |
C:\code\project\local | project--local |
/home/dev/app | app |
Generic folder names (code, project, local, src, etc.) trigger path-based naming with parent context.
Commands
/renameAI
AI-assisted session renaming. Analyzes your conversation and suggests a descriptive name.
> /renameAI
Analyzing conversation...
Suggested name: "AuthRefactorAndTests"
/sessioninfo
Display current session state including ID, name, run number, and log paths.
> /sessioninfo
Session ID: 833a100e-d959-47aa-9db2-d22fdb6d7659
Session Name: my-project
Run Number: 2
Sesslog Directory: ~/.claude/sesslogs/my-project__833a100e-..._User/
Tips
- First-time
/rename: The built-in /rename command may fail on first use in a new session (before any tools run). Just run it again or use any tool first. See Known Quirks.
Configuration
The hook creates these directories automatically: