# Session Lens > Reads an AI coding agent's session file into something a person can actually > read — a turn-grouped chat view, a tool-call timeline, an exact token and cost > census — then reviews the run with a model and checks that review against the > file's own arithmetic. URL: https://session-lens.skillsafe.ai/ API: https://session-lens.skillsafe.ai/api.html Tokens: https://session-lens.skillsafe.ai/tokens.html ## What it is for Coding agents (Claude Code, OpenClaw, Gemini CLI) write a JSONL transcript of every run. Those files are the only durable record of what an agent actually did, and in a terminal they are unreadable. Session Lens opens one and answers three questions a person has after a run: was that a good use of the agent, what did it actually change, and — when it went wrong — why. ## Input One session file, dropped or pasted: - `.jsonl` from Claude Code (top-level `type` of `user`/`assistant`, `uuid` ids, assistant turns arriving as several streamed chunks sharing one `message.id`) - `.jsonl` from OpenClaw (every entry `type: "message"`, role at `message.role` including a distinct `toolResult` role, tool calls typed `toolCall`) - `.json` from Gemini CLI (a single object with a `messages[]` array of `parts`, using `functionCall` / `functionResponse`) The format is auto-detected. Each agent writes one transcript per run and stores it locally; where exactly varies by tool, platform and version, so consult the agent's own documentation. Files up to 24 MB are read at once, via the browser's file picker or drag-and-drop — this app takes a file the user hands it and has no filesystem access of its own. Parsing, reading, searching and exporting happen entirely in the browser; the file is not uploaded for any of that. ## What runs free in the browser, with no account - Turn-grouped chat view: user asks, agent text, collapsible thinking blocks, tool calls with their arguments, tool results with failures marked, and an inline diff for edit-shaped tool calls (`old_string` / `new_string`). - Gantt timeline of every tool call that carries usable timestamps, scaled to the session's own span, failures in red. Calls without timestamps are counted and reported rather than drawn as instant. - Token accounting: input, output, cache read, cache write, per turn and in total, plus the cache hit rate. - Cost estimate at published list price for the model the file names, with the per-bucket breakdown. Cache reads are priced at a tenth of the input rate and a five-minute cache write at 1.25x. This is a comparison tool, not an invoice. - Failure and thrash census: failed tool calls by tool, and the same tool called with byte-identical arguments more than once — the clearest machine-checkable signal that a run was stuck in a loop. - Files census: every path any tool call named, with reads, writes and failures. - Full-text search across message text, tool arguments and tool results, including inside collapsed blocks. - Export: transcript as Markdown, the census as JSON, per-turn tokens as CSV. ## The three AI lanes (metered) All three take the same session and return the same output envelope. `task` selects one. - `review` — was this a good use of the agent? Verdict: `efficient`, `acceptable`, `wasteful`. Reports thrash, failure loops, reading it should or should not have done, instruction drift, token shape, turn economy. - `digest` — what did the session change? Verdict: `complete`, `partial`, `unclear`. The handoff or PR note: files written, decisions taken, what was left unfinished, what was claimed without evidence. - `debug` — why did it fail? Verdict: `root-cause-found`, `probable-cause`, `insufficient-evidence`. Works backwards from the errored tool results to the earliest point the run went off the rails, and distinguishes the agent's mistake from a broken environment from a real bug it correctly surfaced. `review` and `digest` are the common pairing in one sitting: judge the run, then write it up. The result panel carries a button that pre-fills either other lane from the current answer. ## Two design decisions worth quoting **Clipping is not truncation.** A real session is megabytes, so the transcript is clipped before it is sent — but the final turns are always kept in full, because that is where a run goes wrong, and a prefix-only cut would throw away the thing being asked about. The opening ask is kept in full when it fits and as a one-line summary otherwise. Turns that did not fit become one-line stubs naming their tools and failures, and the model is instructed never to describe a turn it cannot see. Long blocks are cut head-and-tail with the size of the cut stated inline, because a traceback carries its diagnosis in the last lines. The user is told exactly what was sent before they pay. **The review is checked against the file.** The model is handed the browser's census as ground truth and told the census wins. Afterwards, every count it restates, every turn number it cites, and every file path it quotes as evidence is compared against that census, and the disagreements are printed above the findings. Where the review and the file disagree, the file is right. A tool that asks a model to judge a transcript and then prints the answer unchecked is guessing; this one shows its work. ## Output envelope VERDICT: HEADLINE: ## SUMMARY <2-5 sentences> ## FINDINGS ### | <critical|major|minor> | turn <n or -> <1-4 sentences> EVIDENCE: <verbatim tool name, path, or quoted excerpt> ACTION: <one concrete change, imperative> ## NUMBERS - <label>: <value> ## NEXT 1. <concrete next step> An empty findings section is the literal line `None — the run was clean on this axis.`, never a bare heading. The parser runs on every stream delta, so a run that dies mid-answer still renders what arrived, labelled with how many of the four sections were recovered. ## Cost and accounts Reading a session is free and needs no account. Running a lane is metered: the credit hold is shown before the run and you are charged only for what the run uses, which is usually far less. The bundled example replays a saved answer for free with no sign-in. Past runs are saved to the SkillSafe account rather than to one browser, with a local mirror for instant paint and offline reads. ## Provenance and limits The session parsing and the viewer are derived from [agent-chatlens](https://github.com/kangjinghang/agent-chatlens) by kangjinghang, used under the MIT licence. This app is an independent derived work; it is not affiliated with that project, nor with Anthropic, OpenClaw or Google. Known limits, stated rather than hidden: the cost estimate is list price and not a bill; a session that records no model name is not priced at all; tool calls without timestamps cannot appear on the timeline; the browser renders 25 turns at a time with a "show more" control rather than virtualising, so a 4,000-message session is paged; and the AI lanes see a clipped transcript, never the whole file.