Open source · Prompt & Agent Workflows

Agent Loop Trace Reader

Read agent traces as steps, tool calls, waits, retries and terminal outcomes.

v0.1.0 · Node.js 22+ · MIT

Browse the public repository · View releases

Nothing is fetched, no model is called, and the only clock is the one the command line injects for this tool's own analysis budget.

This walkthrough uses the tool's public README and checked-in example files. Run the command from a repository checkout with Node.js 22+; inspect the source before using it on your own files.

Run the checked-in example

# A run that finished cleanly
node bin/agent-loop-trace-reader.mjs --trace examples/completed-trace.json --human
echo "exit: $?"   # 0

# A run that looped and overran its budget -- a verdict, so exit 1
node bin/agent-loop-trace-reader.mjs --trace examples/looping-trace.json --human
echo "exit: $?"   # 1

# A run that was interrupted -- no verdict is possible, so exit 2
node bin/agent-loop-trace-reader.mjs --trace examples/interrupted-trace.json --human
echo "exit: $?"   # 2

# The machine-readable report, which is what stdout carries by default
node bin/agent-loop-trace-reader.mjs --trace examples/looping-trace.json | jq .summary

# The structured summary, written whatever the status
node bin/agent-loop-trace-reader.mjs \
  --trace examples/interrupted-trace.json \
  --summary build/interrupted-summary.json

npm run check     # lint, tests, all three examples, and a packaging dry run

Read the result

The two shapes of exit 2 are deliberate. A configuration error means the run never had a subject, so there is nothing to report about. An unreadable trace means the run had a subject and failed to obtain evidence about it, and a consumer needs the report to know which input was not read.

Where this check stops

Every limit is enforced, wired to a flag and to --config, and reported by name. Nothing is truncated to fit: a trace over a limit is refused whole and the run is incomplete, because the half that is missing is exactly where the loop or the unanswered call would have been.

Before adapting the command to your own workflow, review the accepted inputs, exit codes and safety boundaries in the README.

Compiled with AI assistance from checked-in public documentation and example scripts. Run the example and review the repository's current documentation before relying on its result.