ox-session-review

ox-session-review is a command for Claude Code from sageox/ox. It costs 0 tokens per session (3,370 once invoked), scanned A, original, MIT.

A command for auditing recorded coding-agent sessions stored in a project ledger, then identifying sessions that may need cleanup or regeneration.

In plain words
What is it for?
Use it to scan session quality, apply the documented failure checks, report problematic sessions, and offer removal or regeneration of cleanup candidates.
Why use it?
It catches known recording and storage problems before cleanup can make them worse, including missing data, invalid pointers, and empty session files.

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

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/ox/ox-session-review.svg)](https://agentmods.dev/commands/sageox/ox/ox-session-review)
Your own site
<a href="https://agentmods.dev/commands/sageox/ox/ox-session-review"><img src="https://agentmods.dev/badge/commands/sageox/ox/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 3,370 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.03370
Opus 5 $0.00000 $0.01685
Sonnet 5 $0.00000 $0.00674
Haiku 4.5 $0.00000 $0.00337

Measured 5d ago against content hash 549686a5e528, 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 5d 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/commands/ox-session-review.md · 291 lines

How it starts

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

Audit every session in the project ledger for quality, then offer cleanup and regeneration.

This skill carries the operational knowledge from the 2026-04-25 cleanup (see PRs #559–#564 and bd ox-b917, ox-9o29, ox-4ncz, ox-1i3k). Read the Failure-mode watch-list before acting — it is the difference between a routine audit and re-causing the same incident.

Failure-mode watch-list (READ FIRST)

When operating on the ledger, watch for and handle each of these explicitly. Silent skipping is not allowed — surface them in the report.

Mode Symptom Right action
Cache-only invariant break After hydration, the in-place <ledger>/sessions/<name>/raw.jsonl is real content (not a ~140B LFS pointer). Stop. Do not run any ox command that may git add the session dir. Investigate which code path wrote in-place — likely a regression of .claude/rules/cache-only-design.md.
Phantom LFS OID ox session download returns HTTP 404 from the LFS Batch API for an OID referenced in meta.json. Unrecoverable from client. ox session remove <name> --force and report the lost session in the final summary.
0-byte in-place stub meta.json references a real OID, but in-place file is 0 bytes (and not a pointer). Treat as needing download. Confirm cmd/ox/session_hydrate.go has the info.Size() > 0 guard (PR #564). Without it, the resolver will silently return "" forever.
Daemon anti-entropy clobber A freshly-pushed good summary gets overwritten with a failure-marker stub minutes later. The daemon scheduled finalize before our regen landed. Look at internal/daemon/agentwork/session_finalize.go workNoLongerNeeded re-verify guard (PR #561). If running a long batch regen, prefer a quiet daemon window.
Validation banner on the website Site shows "Summary failed content validation: title too short" but the ledger has good content. Likely browser-side React Query cache (staleTime 5m, gcTime 30m). Verify origin/main HEAD has the right summary; advise hard refresh. Do not "fix" by re-pushing.
LLM regenerate hangs / asks for permission Regenerate spawns Claude Code and times out without writing. Pass --permission-mode bypassPermissions to the headless invocation (PR #560 / regenerate flow).

Read the full file on GitHub · 291 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. 5d ago First seen · 291 lines · 0 tokens per session scan A 549686a5e528

Subscribe to this mod's changes

ox-session-review is a command published in the GitHub repository sageox/ox (51 stars, last pushed today), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 3,370 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.