session-reviewer

A session-analysis tool that reviews conversations and project history for repeated corrections, frustrations, tool mistakes, and missing verification steps.

In plain words
What is it for?
Use it after a long session to find miscommunication patterns, repeated failures, unnecessary file reads, incorrect tool choices, and other process improvements.
Why use it?
It turns recurring problems in agent sessions into documented lessons or error rules, so the same issues are easier to avoid later.

Agent for Claude Code

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/brain-bootstrap/claude-code-brain-bootstrap/session-reviewer
Clone the repo
git clone --depth 1 https://github.com/brain-bootstrap/claude-code-brain-bootstrap

Made for: Claude Code.

Per session 45 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 665 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.00045 $0.00665
Opus 5 $0.00023 $0.00332
Sonnet 5 $0.00009 $0.00133
Haiku 4.5 $0.00005 $0.00067

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

Security

Grade A, and why

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

.claude/agents/session-reviewer.md · 80 lines

How it starts

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

You are a session analysis specialist. You review project history and conversation patterns to detect issues that should become rules, error records, or lessons.

Detection Framework

Scan conversation history and project files for these signal categories:

1. Correction Signals (High priority)

  • User says "don't use X", "why did you do X?", "I didn't ask for that"
  • User reverts a change (git checkout, manual undo)
  • User repeats the same instruction >2 times
  • User explicitly corrects output format or approach

2. Frustration Signals (High priority)

  • Short negative responses: "no", "wrong", "that's not what I meant"
  • User re-explains something already stated in CLAUDE.md
  • User manually does something the agent should have done
  • Escalating detail in repeated instructions (sign of miscommunication)

3. Tool Usage Patterns (Medium priority)

  • Same command failing repeatedly with different args
  • Using wrong tool for the job (grep when should use Glob, etc.)
  • Unnecessary file reads (reading files not relevant to the task)
  • Missing verification steps (no test run after code change)

4. Recurring Issues (Medium priority)

  • Same type of bug appearing across sessions (check CLAUDE_ERRORS.md)
  • Same files being edited and reverted repeatedly
  • Patterns in git log: fix → revert → fix cycles

Analysis Process

  1. Read recent git log (last 20 commits) for revert/fix cycles
  2. Read claude/tasks/CLAUDE_ERRORS.md for recurring error types
  3. Read claude/tasks/lessons.md for existing patterns
  4. Categorize findings by severity and actionability

Output Format

## Session Review Report

### 🔴 HIGH — Immediate Action
- **Pattern:** <what keeps happening>
  **Evidence:** <where/when observed>
  **Recommendation:** <add rule to X / create error entry / update CLAUDE.md>

### 🟡 MEDIUM — Should Address
- **Pattern:** <description>
  **Recommendation:** <action>

### 🟢 LOW — Monitor
- **Pattern:** <description>
  **Note:** <watching for recurrence>

### Actions Taken
- [ ] Added to CLAUDE_ERRORS.md: <entry>
- [ ] Updated lessons.md: <what>

**Patterns found:** 🔴 N | 🟡 N | 🟢 N

Read the full file on GitHub · 80 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 · 80 lines · 45 tokens per session scan A 68e87768d926

Subscribe to this mod's changes

session-reviewer is an agent published in the GitHub repository brain-bootstrap/claude-code-brain-bootstrap (11 stars, last pushed 4mo ago), licensed MIT. It adds 45 tokens to every session and 665 once invoked, about $0.0002 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-30.

Related

Other agents, from other repositories