ox-session-review

ox-session-review is a command for Claude Code from sageox/agentx. It costs 0 tokens per session (1,168 once invoked), scanned A, a copy of ox-session-review, MIT.

A review command for auditing recorded SageOx sessions, which are logs of coding-agent work stored in a project ledger. It scans sessions and scores their summaries and contents for quality.

In plain words
What is it for?
Use it to list sessions, inspect their metadata and logs, check whether data is downloaded, and evaluate summaries, file records, messages, and tool activity.
Why use it?
It helps find empty, incomplete, poorly titled, or otherwise weak session records. The review can identify sessions that may need cleanup or regenerated summaries.

Command 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 commands/sageox/agentx/ox-session-review
Clone the repo
git clone --depth 1 https://github.com/sageox/agentx

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for ox-session-review

README.md
[![agentmods](https://agentmods.dev/badge/commands/sageox/agentx/ox-session-review.svg)](https://agentmods.dev/commands/sageox/agentx/ox-session-review)
Your own site
<a href="https://agentmods.dev/commands/sageox/agentx/ox-session-review"><img src="https://agentmods.dev/badge/commands/sageox/agentx/ox-session-review.svg" alt="Measured on agentmods" height="20"></a>
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,168 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin 98% copy Near-identical to another mod 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.01168
Opus 5 $0.00000 $0.00584
Sonnet 5 $0.00000 $0.00234
Haiku 4.5 $0.00000 $0.00117

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

Security

Grade A, and why

ox-session-review 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 4d 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

This is a copy

98% identical to ox-session-review — 2 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

.claude/commands/ox-session-review.md · 115 lines

How it starts

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

Audit all sessions in the project ledger for quality, then offer cleanup and regeneration actions.

Phase 1 — Scan & Score (read-only)

  1. Run ox session list --all to enumerate all sessions
  2. Resolve the ledger sessions directory:
    • Read .sageox/config.json to get repo_id and endpoint
    • The ledger lives at ~/.local/share/sageox/<endpoint-slug>/ledgers/<repo_id>/sessions/
    • List subdirectories — each is a session folder
  3. For each session directory: a. Read meta.json — get entry_count, title, summary, files, created_at b. Read summary.json if it exists — get title, summary, key_actions, outcome c. Check hydration status: if raw.jsonl is missing or is an LFS pointer (starts with version https://git-lfs.github.com), run ox session download <session_name> to hydrate it d. Read raw.jsonl — count substantive messages, tool calls (Write/Edit), total entries e. Score quality using the signals below

Quality Signals

Categorize each session into one of these buckets (first match wins):

Removal Candidates

  • entry_count is 0 OR meta has no files manifest
  • Very few substantive messages (< 3 user+assistant turns in raw.jsonl)
  • Only skill invocations, no real work (e.g., just /ox-session-start + /ox-session-stop with nothing between)
  • Session errored/failed immediately (check outcome = "failed" in summary, or raw.jsonl shows early error)
  • No files modified (zero Write/Edit tool calls) AND < 5 total entries in raw.jsonl

Missing/Poor Summary

  • No summary.json exists at all
  • summary.json has empty or missing title, summary, or key_actions
  • Summary is fallback stats-only text (matches pattern like "N user messages, N assistant responses")

Read the full file on GitHub · 115 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. 4d ago First seen · 115 lines · 0 tokens per session scan A c74ef276cafe

Subscribe to this mod's changes

ox-session-review is a command published in the GitHub repository sageox/agentx (4 stars, last pushed 17d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,168 tokens. A static security scan graded it A with 0 findings. It is 98% identical to ox-session-review, differing in 2 lines, and is treated as a copy.