Skip to main content

agent-hotwash

PyPI version Python versions CI status Coverage License

Analyzes coding-agent traces (Claude, Codex, pi, code-bench) to surface bad patterns and improvement opportunities via analytics and detectors. Point it at what an agent did to learn how it could have done better, with reports in table, JSON, CSV, or HTML for humans or CI.

Quickstart

Requires uv and Python 3.12.

uv sync          # create the venv and install deps (incl. dev tools)
make check       # run the full hygiene gate (format, lint, typecheck, tests)
uv run agent-hotwash --help

Usage

Point analyze at any trace file or directory. It auto-detects the format (code-bench run/experiment dirs, native Claude project dirs, native Codex rollouts, native pi session dirs), runs analytics + detectors, and renders a report.

uv run agent-hotwash --help
uv run agent-hotwash analyze <path>...                 # analyze one or more traces
uv run agent-hotwash analyze <path> --format table     # human table (default on a TTY)
uv run agent-hotwash analyze <path> --format json      # machine JSON (default when piped)
uv run agent-hotwash analyze <path> --format html --out report.html
uv run agent-hotwash analyze <path> --format csv --out rows.csv
uv run agent-hotwash analyze ~/.codex/sessions/2026/09/18 --format table
uv run agent-hotwash analyze ~/.codex/sessions/2026/09 --format json --out month.json   # whole month, all CPUs
uv run agent-hotwash analyze <rollout> --semantic cached --format table

Common flags: --config FILE (user TOML merged over defaults), --no-detectors (analytics only), --fail-on high (CI gate: non-zero exit if a finding at/above the given severity is present), --semantic off|cached|live (default live; exits 1 immediately if TYPESAFE_API_KEY is unset — pass --semantic off or export the key), --jobs N (worker processes; default 0 = one per CPU, capped at the number of traces; 1 runs in-process). cached reads ~/.cache/agent-hotwash/systemone (not the old jev cache); warm it with one live run. Pytest / make check / GitHub Actions set AGENT_HOTWASH_SEMANTIC=off so the suite does not need a key.

Throughput: a Codex directory is indexed once (whole tree, so parent/child threads on different days still link), grouped into thread trees, and each tree is loaded and analyzed in its own worker, largest first. A trace that fails to parse is reported on stderr and skipped; the report still covers the rest and the exit code is 1. In --semantic live, the JeV budget in [semantic] (requests_per_second, burst, max_concurrency, max_retries, timeout_s) is global per invocation — one shared token bucket across all workers — and 429/5xx responses are retried with capped, jittered backoff that honours Retry-After.

Formats: table (rich, degrades to plain text off a TTY), json, csv (one row per run + a column per finding id), html (single self-contained file, no external assets). --out takes a file or a directory (writes report.<ext>); omit it to stream to stdout. When semantic mode is on, table/HTML include a task card (Intent / Shape / Actual / Trajectory / Diagnosis) and a monthly root-task rollup. Those JSON sections are omitted in --semantic off; CSV columns stay the same.

Other commands:

uv run agent-hotwash threads PATH --format json   # Codex thread trees (json or table)
uv run agent-hotwash detectors --format json      # list registered detectors
uv run agent-hotwash config-show                  # dump the effective merged config
uv run agent-hotwash label PATH --store labels.jsonl --annotator you
uv run agent-hotwash eval --store labels.jsonl
uv run agent-hotwash version

Output contract (AI-friendly): structured data goes to stdout, all human/progress messages to stderr. Exit codes: 0 success, 1 error, 2 no analyzable traces found (or --fail-on tripped). cached mode exits 1 on a cache miss; default live exits 1 before analysis if TYPESAFE_API_KEY is unset.

Architecture: docs/DESIGN.md. Semantic diagnoses are experimental until the labelling eval in that doc.

Make targets

Run make help for the full list. The static-check targets are quiet on success — they print one <Name>: OK line and only dump full tool output on failure, to keep transcripts short for AI agents.

Target What it does
install / sync Sync the venv from uv.lock (incl. dev group).
format / fmt Format src + tests with ruff.
lint Lint with ruff (silent unless it fails).
format-check Check formatting with ruff (silent unless it fails).
typecheck Type-check with ty.
bank-check Lint native System One feature TOML (systemoneprompts check).
test Deterministic pytest suite (no TypeSafe key).
test-live Live TypeSafe smoke (TYPESAFE_API_KEY required).
check Full gate: format-check + lint + typecheck + bank-check + tests, parallel.
release make release BUMP=minor — gate, bump, tag, build dists.
clean Remove caches and build artifacts.

Layout

src/agent_hotwash/   package (CLI entry point in cli.py)
tests/               pytest suite

Tooling

  • uv — env and dependency management.
  • ruff — lint + format.
  • ty — type checking.
  • pytest — tests.

Metadata

Release files for agent-hotwash 0.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for agent-hotwash 0.3.0
File Size Uploaded
agent_hotwash-0.3.0.tar.gz 194.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for agent-hotwash 0.3.0
File Interpreter ABI Platform
agent_hotwash-0.3.0-py3-none-any.whl Python 3 none any Details

Total release size: 423.5 kB

Release files / agent_hotwash-0.3.0.tar.gz

Download URL agent_hotwash-0.3.0.tar.gz
Size 194.4 kB
Tags Source
SHA-256 checksum
How to use checksums
23798c00342fde279e543bda2dd2e6d86f51446b52af8957bdb777326418b261
BLAKE2b-256 checksum
How to use checksums
1e6d59d82f2e7997c48d068cf7bd22b9ef90fc7ce06cf55168fec1f2efd8ef3b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.23 {"installer":{"name":"uv","version":"0.11.23","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / agent_hotwash-0.3.0-py3-none-any.whl

Download URL agent_hotwash-0.3.0-py3-none-any.whl
Size 229.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ec898452d3d87bcb2f790dd39ac6500b5f94fbc49d6779821a89d007244b8cca
BLAKE2b-256 checksum
How to use checksums
844388f47c5eaf2a0dd564d3522a5d03e4b3a42c6bd055873b6a044cc578e34a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.23 {"installer":{"name":"uv","version":"0.11.23","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release history Release notifications | RSS feed

0.5.0

2 release files

0.4.0

2 release files

This release

0.3.0 This release

2 release files

0.2.0

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page