Expand description
Claude Code session reader
Reads session JSONL files from ~/.claude/ and extracts events
such as tool calls, text responses, and completion markers.
Structs§
- Session
- Active Claude Code session
- Subagent
Meta - Subagent metadata
Enums§
- Session
Event - Event extracted from session JSONL
Functions§
- extract_
surface_ id - Extract the initial prompt content from a session JSONL (queue-operation). Useful for identifying which SURFACE-XXX a session is analyzing.
- find_
active_ project_ sessions - Find session IDs in a project directory that are currently active.
- list_
active_ sessions - List active Claude Code sessions by reading
~/.claude/sessions/. Only returns sessions whose PID is still alive. - list_
subagents - List subagents for a given session.
- project_
sessions_ dir - Resolve the project sessions directory for a given working directory.
- read_
events_ from - Read new events from a JSONL file starting at
offsetbytes. Returns the events and the new offset for the next read.