session-compare

A command that compares two distilled cLens sessions side by side. Distilled sessions are shortened records containing extracted details from agent runs.

In plain words
What is it for?
It is for comparing specified or recent sessions using their statistics, backtracks, decisions, file changes, reasoning, timeline, and related data.
Why use it?
It helps determine how two approaches differed and which one was more effective.

Command

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/silouone/clens/session-compare
Clone the repo
git clone --depth 1 https://github.com/silouone/clens
Per session 13 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 811 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00013 $0.00811
Opus 5 $0.00006 $0.00405
Sonnet 5 $0.00003 $0.00162
Haiku 4.5 $0.00001 $0.00081

Measured 2d ago against content hash 5ce8d017c770, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

session-compare scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

Origin

Copies of this mod

1 near-identical copy found in the catalogue:

packages/cli/agentic/commands/session-compare.md · 105 lines

How it starts

The opening of the file, as written. The whole thing — 105 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Session Compare Command

Compare two distilled clens sessions side-by-side to identify performance differences and determine which approach was more effective.

Setup

Load the session-analysis skill for schema knowledge and interpretation context before proceeding.

Variables

TARGET: $ARGUMENTS

Workflow

1. Resolve Both Sessions

  • If TARGET contains two session IDs (space-separated), use those
  • If TARGET is --last 2 or --last, find the two most recent distilled sessions in .clens/distilled/
  • If TARGET contains only one session ID, use it as Session A and the most recent other session as Session B
  • If fewer than 2 distilled sessions exist, inform the user:

    Need at least 2 distilled sessions to compare. Run clens distill on more sessions first.

Label the older session as Session A and the newer as Session B.

2. Gather Data for Both Sessions

Read both distilled JSON files from .clens/distilled/{sessionId}.json for the full DistilledSession objects. Each contains all extracted data: stats, backtracks, decisions, file_map, git_diff, edit_chains, reasoning, user_messages, summary, timeline, agents, team_metrics, communication_graph, plan_drift, and cost_estimate.

No CLI commands are needed — the distilled JSON files are the primary data source.

3. Compute Metrics Comparison

Build a comparison table with deltas for:

Metric How to Compare
Duration Shorter is better
Tool calls Fewer is generally better
Failures Fewer is better
Failure rate Lower is better
Estimated cost Lower is better
Backtracks Fewer is better
Files touched Context-dependent
Files modified Context-dependent
Thinking blocks Context-dependent

Use arrows or indicators to mark which session performed better on each metric.

4. Compare Backtracks

Break down backtracks by type for both sessions:

  • failure_retry count in A vs B
  • iteration_struggle count in A vs B
  • debugging_loop count in A vs B

Read the full file on GitHub · 105 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 105 lines · 13 tokens per session scan A 5ce8d017c770

Subscribe to this mod's changes

session-compare is a command published in the GitHub repository silouone/clens (6 stars, last pushed 1mo ago), licensed MIT. It adds 13 tokens to every session and 811 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.