agentscrub: find and redact secrets in agent session logs

Agent sessions are written to disk, and they often contain whatever you pasted or the agent printed: API keys, cloud credentials, email addresses. agentscrub, by Jarvis Osorio, finds those transcripts and cleans them without sending anything anywhere.

The workflow

  1. agentscrub discover lists recognized session files (Claude Code, Codex, Cursor and generic JSONL/JSON).
  2. agentscrub scan reports findings with masked values and fingerprints only, so the report itself never leaks a raw secret.
  3. agentscrub scrub is a dry run by default. Nothing is rewritten until you add --confirm.
  4. agentscrub verify re-checks the file and exits 0 only when it is clean.

Conservative by design

The README lists the guardrails: no accounts, no telemetry, Cursor rewriting is read-only in v0.1, and retention deletion is behind a flag that is off. Exit codes are specific (for example 5 for an unclean verify and 8 for an incomplete scan), so a script can tell "found secrets" from "could not finish".

A practical tip from the README: copy fixtures to a temp folder before experimenting, and never scrub originals in place while you are learning the tool.

Status

v0.1.0, released 13 November 2026 (Apache-2.0), with CI on Linux, macOS and Windows. Requires Rust 1.89+. Not on crates.io or Homebrew yet: cargo install --path . from a clone.

Source: github.com/JarvisOsorio/agent-session-scrubber · Docs: labs.jarvisosorio.com/agent-session-scrubber · Next: Agent Replay Lab