Capture and analyze Claude Code sessions locally to track every tool call, decision, and reasoning step without external dependencies.
README
Local-first session capture and analysis for Claude Code agents. See what your agent actually did — every tool call, backtrack, decision, and reasoning step — without any network dependencies.
cLens hooks into Claude Code to capture complete session traces as local JSONL files. Every tool call, session lifecycle event, and agent message is appended to a flat file in your project — no network, no server, no external dependencies. After a session, the distill command runs 23 extractors to surface decision points, backtracks, reasoning patterns, edit chains, plan drift, multi-agent communication, and more for post-hoc analysis.
Bun >= 1.0
npm install -g clens # or: bun install -g clens
Then in any project:
clens init # install hooks
# use Claude Code normally
clens list # see captured sessions
clens distill --last # analyze latest session