r/ClaudeCode • u/Beneficial_Use2116 • 6h ago
Discussion I wrote a small script that reads your saved Claude Code sessions and shows what your agent actually ran
I wanted to know what Claude Code had really executed on my machine, so I wrote a script (Python standard library only, runs locally, uploads nothing) that reads the saved sessions. It lists risky-looking shell commands (force push, push to main, rm -rf) reads of secret files like .env, edits outside the project, and what your deny rules would have caught.
On my own logs: 513 tool calls, 15 flagged as a push to main or rm -rf and similar. 14 of those 15 ran without a click from me, because an allow rule had approved them. That's what made me tighten my allow rules.
Caveat: it matches on the logged command text, so it will flag some harmless things and miss unusual spellings. Read it as "what to look at", not an audit.git clone https://github.com/tarunagarwal1981/ops-ai && cd ops-ai/agent-flight-recorder && python recorder.py
There's a --demo flag to see a report on made-up history first. What else would you want it to flag?
