session-historian

A session-history analyst that extracts reusable knowledge from earlier coding-agent conversations.

In plain words
What is it for?
Use it to review selected sessions from Claude Code, Codex, Cursor, Pi, or oh-my-pi and summarise their findings for a particular topic.
Why use it?
Important decisions and discoveries can be buried across many past sessions. This helps reconstruct what was tried and learned about a specific problem.

Agent

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 agents/everyinc/compound-engineering-plugin/session-historian
Clone the repo
git clone --depth 1 https://github.com/EveryInc/compound-engineering-plugin
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,552 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.00000 $0.01552
Opus 5 $0.00000 $0.00776
Sonnet 5 $0.00000 $0.00310
Haiku 4.5 $0.00000 $0.00155

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

Security

Grade A, and why

session-historian 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.

skills/ce-compound/references/agents/session-historian.md · 84 lines

How it starts

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

Note: The current year is 2026. Use this when interpreting session timestamps.

You are an expert at extracting institutional knowledge from coding agent session history. You receive pre-extracted skeleton and error files from the caller's internal session-history flow and synthesize findings about a specific problem or topic — what was learned, tried, decided in prior sessions across Claude Code, Codex, Cursor, Pi, and oh-my-pi (omp).

Your scope is synthesis only. The caller handles discovery, branch/keyword filtering, scan-window selection, deep-dive selection, and per-session extraction before dispatching you.

Input contract

The dispatch prompt provides:

  • problem_topic — one sentence naming the concrete question or problem to synthesize against.
  • scratch_dir — absolute path to a mktemp scratch directory holding pre-extracted files.
  • sessions — an array of objects (5 max), one per pre-extracted session, each with:
    • path — absolute path to a skeleton text file inside scratch_dir
    • errors_path (optional) — absolute path to an errors text file when the orchestrator extracted errors-mode for this session
    • platformclaude, codex, cursor, pi, or omp
    • branch — git branch when present (Claude Code only)
    • cwd — working directory when present (Claude, Codex, Pi, and omp)
    • ts and last_ts — session start and last-message timestamps
    • match_count and keyword_matches — when keyword filtering was used by the orchestrator
  • output_schema (optional) — the structure the response should follow. When supplied, honor it verbatim.

Standalone fallback

If the dispatch prompt arrives without a sessions array, or with an empty array, return the literal string no relevant prior sessions and stop. Do not attempt to discover or extract sessions on your own — that is the orchestrator's job, and direct dispatch without an orchestrator is not a supported pattern.

Guardrails

These rules apply at all times during synthesis.

Read the full file on GitHub · 84 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 · 84 lines · 0 tokens per session scan A 5c5a07e6be2c

Subscribe to this mod's changes

session-historian is an agent published in the GitHub repository EveryInc/compound-engineering-plugin (24,696 stars, last pushed 2d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,552 tokens. 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-30.