Skip to main content

Agent Blackbox: Recording Commands Without Keeping Raw Output by Default

Sanitized command capture, bounded recording, and the limits of what a subprocess flight recorder can prove.

2 min read
Agent Blackbox: Recording Commands Without Keeping Raw Output by Default
On this page

Current repository behavior
Reviewed September 5, 2026 against the public Agent Blackbox repository. It is a pre-1.0 pilot with no GitHub release or PyPI publication found in this review. Install from a reviewed checkout; do not assume pip install agent-blackbox is a published package.

When an agent claims success, a reviewer needs the command and its result. Agent Blackbox captures a process while it runs, then turns the output into a local diagnostic record. The current privacy default is materially different from the original article: both persisted output and console output are sanitized unless raw capture is explicitly requested.

Install from a reviewed checkout

bash
git clone https://github.com/godhiraj-code/agent-blackbox.git
cd agent-blackbox
python -m pip install .
agent-blackbox --version
agent-blackbox demo

Record a small command first

bash
agent-blackbox record --name "smoke" --out-dir runs -- python -c "print('recording proof')"
agent-blackbox run-doctor --runs-dir runs --out exports/latest-run-postmortem.md

run-doctor selects the newest matching recording. For a specific incident, use diagnose-run with the exact recording path. Avoid assuming that “newest” identifies the task you intended when several processes write to the same directory.

The privacy boundary

DefaultExplicit opt-in
Sanitized stored output and argumentsrecord --store-raw retains raw output
Sanitized console outputrecord --show-raw-console streams raw output
10 MiB capture limit--max-capture-bytes changes the bound
Local reports and atomic writesOperator manages retention and sharing

Raw source transcripts can still contain private data. Redaction is defense in depth, not a proof of anonymity. Review exports before sharing and keep raw captures out of Git and shared CI artifacts.

Capture is not deterministic replay

A subprocess recorder sees what the target process emits. It cannot reconstruct hidden internal actions, prove that a command was safe, or turn a nondeterministic agent into a deterministic system. Buffering and scheduling also affect stream order; the earlier sub-millisecond fidelity claim was not justified.

Use diagnostic exits deliberately

Analysis distinguishes healthy results, diagnosed incidents, and invalid or unsupported evidence. Invalid evidence must not become a clean run. Use the documented CI modes and nonzero exit codes for gating; use report-only overrides only when that is an intentional integration choice.

Turn evidence into the next check

Compare the final claim with the command output and the actual changed state. If output shows that verification was skipped, add the missing check to the harness. A recorder helps identify the gap; it does not close it by itself.

Current project documentation

Dhiraj Das

About the Author

Dhiraj Das is an Automation Consultant with over a decade of experience building systems that expose failures, reduce flakiness, and make complex workflows repeatable. He applies that discipline to AI-agent validation, LLM testing, and postmortems.

He shares small open source utilities from real automation work, including: waitless (flaky tests), sb-stealth-wrapper (bot detection), selenium-teleport (state persistence), selenium-chatbot-test (AI chatbot testing), lumos-shadowdom (Shadow DOM), and visual-guard (visual regression).

Share this article: